mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-26 18:00:43 +01:00
@@ -1,15 +1,19 @@
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import Drawer, { type DrawerProps, type DrawerSlots } from '../../src/runtime/components/Drawer.vue'
|
||||
import ComponentRender from '../component-render'
|
||||
import theme from '#build/ui/drawer'
|
||||
|
||||
describe('Drawer', () => {
|
||||
const directions = Object.keys(theme.variants.direction) as any
|
||||
|
||||
const props = { open: true, portal: false }
|
||||
|
||||
it.each([
|
||||
// Props
|
||||
['with title', { props: { ...props, title: 'Title' } }],
|
||||
['with description', { props: { ...props, title: 'Title', description: 'Description' } }],
|
||||
['with left direction', { props: { ...props, direction: 'left' as const, title: 'Title', description: 'Description' } }],
|
||||
...directions.map((direction: string) => [`with direction ${direction}`, { props: { ...props, direction, title: 'Title', description: 'Description' } }]),
|
||||
...directions.map((direction: string) => [`with direction ${direction} inset`, { props: { ...props, direction, inset: true, title: 'Title', description: 'Description' } }]),
|
||||
['with top direction', { props: { ...props, direction: 'top' as const, title: 'Title', description: 'Description' } }],
|
||||
['with right direction', { props: { ...props, direction: 'right' as const, title: 'Title', description: 'Description' } }],
|
||||
['without handle', { props: { ...props, handle: false, title: 'Title', description: 'Description' } }],
|
||||
|
||||
Reference in New Issue
Block a user