wallnote/src/pages/wall/components/SplitToast.tsx
2025-02-25 13:19:38 +08:00

25 lines
1.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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>
);
}