chore(Toast): update slots

This commit is contained in:
Benjamin Canac
2024-04-12 18:59:53 +02:00
parent 48ddf39188
commit 514d17048f
3 changed files with 149 additions and 2 deletions

View File

@@ -28,7 +28,11 @@ describe('Toast', () => {
['without close', { props: { title: 'Toast', close: null } }],
['with type', { props: { type: 'background' as const } }],
['with class', { props: { class: 'bg-gray-50 dark:bg-gray-800/50' } }],
['with ui', { props: { title: 'Toast', ui: { title: 'font-bold' } } }]
['with ui', { props: { title: 'Toast', ui: { title: 'font-bold' } } }],
['with leading slot', { slots: { title: () => 'Leading slot' } }],
['with title slot', { slots: { title: () => 'Title slot' } }],
['with description slot', { slots: { description: () => 'Description slot' } }],
['with close slot', { slots: { close: () => 'Close slot' } }]
])('renders %s correctly', async (nameOrHtml: string, options: { props?: ToastProps, slots?: any }) => {
const html = await ComponentRender(nameOrHtml, options, ToastWrapper)
expect(html).toMatchSnapshot()