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

@@ -1,6 +1,5 @@
import { describe, it, expect } from 'vitest'
import { UCheckbox } from '#components'
import type { TypeOf } from 'zod'
import Checkbox, { type CheckboxProps } from '../../src/runtime/components/Checkbox.vue'
import ComponentRender from '../component-render'
import { defu } from 'defu'
@@ -25,8 +24,8 @@ describe('Checkbox', () => {
['with size lg', { props: { size: 'lg' as const } }],
['with size xl', { props: { size: 'xl' as const } }]
// @ts-ignore
])('renders %s correctly', async (nameOrHtml: string, options: TypeOf<typeof UCheckbox.props>) => {
const html = await ComponentRender(nameOrHtml, defu(options, { props: { id: 42 } }), UCheckbox)
])('renders %s correctly', async (nameOrHtml: string, options: { props?: CheckboxProps }) => {
const html = await ComponentRender(nameOrHtml, defu(options, { props: { id: 42 } }), Checkbox)
expect(html).toMatchSnapshot()
})
})