feat(Link): style with app config

This commit is contained in:
Benjamin Canac
2024-03-22 12:46:52 +01:00
parent e3ef0c59b9
commit 349780dae1
8 changed files with 107 additions and 32 deletions

View File

@@ -8,8 +8,10 @@ describe('Link', () => {
['with to', { props: { to: '/' } }],
['with type', { props: { type: 'submit' as const } }],
['with disabled', { props: { disabled: true } }],
['with activeClass', { props: { active: true, to: '/', activeClass: 'text-sm' } }],
['with inactiveClass', { props: { active: false, to: '/', inactiveClass: 'text-gray-300' } }]
['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 }) => {
const html = await ComponentRender(nameOrHtml, options, Link)
expect(html).toMatchSnapshot()