feat(Table): add body-top / body-bottom slots (#4354)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Estéban
2025-06-25 11:17:02 +02:00
committed by GitHub
parent 81569713e9
commit 595fc64515
4 changed files with 227 additions and 5 deletions

View File

@@ -161,7 +161,9 @@ describe('Table', () => {
['with expanded slot', { props, slots: { expanded: () => 'Expanded slot' } }],
['with empty slot', { props: { columns }, slots: { empty: () => 'Empty slot' } }],
['with loading slot', { props: { columns, loading: true }, slots: { loading: () => 'Loading slot' } }],
['with caption slot', { props, slots: { caption: () => 'Caption slot' } }]
['with caption slot', { props, slots: { caption: () => 'Caption slot' } }],
['with body-top slot', { props, slots: { 'body-top': () => 'Body top slot' } }],
['with body-bottom slot', { props, slots: { 'body-bottom': () => 'Body bottom slot' } }]
])('renders %s correctly', async (nameOrHtml: string, options: { props?: TableProps, slots?: Partial<TableSlots> }) => {
const html = await ComponentRender(nameOrHtml, options, Table)
expect(html).toMatchSnapshot()