feat(DropdownMenu): new component (#37)

This commit is contained in:
Benjamin Canac
2024-03-29 13:42:02 +01:00
committed by GitHub
parent 2fbf47e1fc
commit 44033508a7
25 changed files with 735 additions and 215 deletions

View File

@@ -15,9 +15,9 @@ const TooltipWrapper = defineComponent({
describe('Tooltip', () => {
it.each([
['with text', { props: { text: 'Tooltip', open: true } }],
['with arrow', { props: { text: 'Tooltip', arrow: true, open: true } }],
['with shortcuts', { props: { text: 'Tooltip', shortcuts: ['⌘', 'K'], open: true } }]
['with text', { props: { text: 'Tooltip', open: true, portal: false } }],
['with arrow', { props: { text: 'Tooltip', arrow: true, open: true, portal: false } }],
['with shortcuts', { props: { text: 'Tooltip', shortcuts: ['⌘', 'K'], open: true, portal: false } }]
])('renders %s correctly', async (nameOrHtml: string, options: { props?: TooltipProps, slots?: any }) => {
const html = await ComponentRender(nameOrHtml, options, TooltipWrapper)
expect(html).toMatchSnapshot()