fix: update default background color and adjust layout for ToastInner component
Some checks failed
container-scan / Container Scan (pull_request) Failing after 4m19s
docker-build / docker (pull_request) Failing after 6m19s

This commit is contained in:
micha 2025-06-20 00:03:24 +02:00
parent 3eb5b4ff1e
commit 1f6f34ba1a

View file

@ -65,7 +65,7 @@ interface ToastInnerProps {
const variantConfig = { const variantConfig = {
default: { default: {
bgColor: 'bg-green-150', bgColor: 'bg-neutral-150',
defaultIcon: 'Info', defaultIcon: 'Info',
}, },
success: { success: {
@ -118,11 +118,18 @@ export const ToastInner: React.FC<ToastInnerProps> = ({
<X className='h-4 w-4 text-neutral-600' /> <X className='h-4 w-4 text-neutral-600' />
</button> </button>
<div className='grid grid-cols-[40px_auto_auto] gap-4 items-center'> <div
{/* Icon */} className={`grid ${
variant === 'default'
? 'grid-cols-[auto_130px] max-sm:grid-cols-[auto_90px]'
: 'grid-cols-[40px_auto_130px] max-sm:grid-cols-[40px_auto_90px]'
} gap-4 items-center`}
>
{variant !== 'default' && (
<div className='flex items-center justify-center'> <div className='flex items-center justify-center'>
<Icon size={40} /> <Icon size={40} />
</div> </div>
)}
{/* Text Content */} {/* Text Content */}
<div className='grid gap-1'> <div className='grid gap-1'>
@ -135,7 +142,7 @@ export const ToastInner: React.FC<ToastInnerProps> = ({
{onAction && buttonText && ( {onAction && buttonText && (
<Button <Button
variant={'secondary'} variant={'secondary'}
className='w-100px w-full mr-2' className='w-full mr-2'
onClick={() => { onClick={() => {
onAction(); onAction();
if (closeOnAction) { if (closeOnAction) {