feat: uniformize components sizes (#68)

This commit is contained in:
Benjamin Canac
2024-04-16 12:26:29 +02:00
committed by GitHub
parent 78e45600de
commit f302a15972
96 changed files with 1854 additions and 1720 deletions

View File

@@ -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()
})