mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-23 08:20:39 +01:00
feat: uniformize components sizes (#68)
This commit is contained in:
@@ -4,6 +4,7 @@ import ComponentRender from '../component-render'
|
||||
|
||||
describe('Link', () => {
|
||||
it.each([
|
||||
// Props
|
||||
['with as', { props: { as: 'div' } }],
|
||||
['with to', { props: { to: '/' } }],
|
||||
['with type', { props: { type: 'submit' as const } }],
|
||||
@@ -11,8 +12,10 @@ describe('Link', () => {
|
||||
['with raw', { props: { raw: true } }],
|
||||
['with class', { props: { class: 'font-medium' } }],
|
||||
['with activeClass', { props: { active: true, activeClass: 'text-gray-900 dark:text-white' } }],
|
||||
['with inactiveClass', { props: { active: false, inactiveClass: 'hover:text-primary-500 dark:hover:text-primary-400' } }]
|
||||
])('renders %s correctly', async (nameOrHtml: string, options: { props: LinkProps }) => {
|
||||
['with inactiveClass', { props: { active: false, inactiveClass: 'hover:text-primary-500 dark:hover:text-primary-400' } }],
|
||||
// Slots
|
||||
['with default slot', { slots: { default: () => 'Default slot' } }]
|
||||
])('renders %s correctly', async (nameOrHtml: string, options: { props?: LinkProps, slots?: any }) => {
|
||||
const html = await ComponentRender(nameOrHtml, options, Link)
|
||||
expect(html).toMatchSnapshot()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user