temp: fix bugs

This commit is contained in:
2025-02-25 13:19:38 +08:00
parent 5ef42ee9de
commit a92e377d9f
15 changed files with 366 additions and 126 deletions

View File

@@ -0,0 +1,24 @@
import { ToastContentProps } from 'react-toastify';
export function SplitButtons({ closeToast }: ToastContentProps) {
return (
// using a grid with 3 columns
<div className='grid grid-cols-[1fr_1px_80px] w-full'>
<div className='flex flex-col p-4'>
<h3 className='text-zinc-800 text-sm font-semibold'></h3>
<p className='text-sm'></p>
</div>
{/* that's the vertical line which separate the text and the buttons*/}
<div className='bg-zinc-900/20 h-full' />
<div className='grid grid-rows-[1fr_1px_1fr] h-full'>
{/*specifying a custom closure reason that can be used with the onClose callback*/}
<button onClick={() => closeToast('cancle')} className='text-purple-600'>
</button>
<div className='bg-zinc-900/20 w-full' />
{/*specifying a custom closure reason that can be used with the onClose callback*/}
<button onClick={() => closeToast('success')}></button>
</div>
</div>
);
}