feat(Button): add subtle variant

This commit is contained in:
Benjamin Canac
2024-04-12 17:23:04 +02:00
parent 9a42338da3
commit 1d2e1caaf5
4 changed files with 16 additions and 6 deletions

View File

@@ -15,6 +15,7 @@ describe('Button', () => {
['with color', { props: { label: 'Button', color: 'red' as const } }],
['with variant outline', { props: { label: 'Button', variant: 'outline' as const } }],
['with variant soft', { props: { label: 'Button', variant: 'soft' as const } }],
['with variant subtle', { props: { label: 'Button', variant: 'subtle' as const } }],
['with variant ghost', { props: { label: 'Button', variant: 'ghost' as const } }],
['with variant link', { props: { label: 'Button', variant: 'link' as const } }],
['with icon', { props: { icon: 'i-heroicons-rocket-launch' } }],

View File

@@ -197,3 +197,10 @@ exports[`Button > renders with variant soft correctly 1`] = `
<!--v-if-->
</button>"
`;
exports[`Button > renders with variant subtle correctly 1`] = `
"<button type="button" class="rounded-md font-medium inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 px-2.5 py-1.5 text-sm gap-x-1.5 text-primary-500 dark:text-primary-400 ring ring-inset ring-primary-500/25 dark:ring-primary-400/25 bg-primary-500/10 hover:bg-primary-100 disabled:bg-primary-50 dark:bg-primary-400/10 dark:hover:bg-primary-950 dark:disabled:bg-primary-400/10 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400">
<!--v-if--><span class="">Button</span>
<!--v-if-->
</button>"
`;