fix: update accessibility warning filters and enhance Button component styles

This commit is contained in:
Norbert Maciaszek
2025-11-17 22:18:51 +01:00
parent 915131db58
commit 2caf688dfa
2 changed files with 4 additions and 3 deletions

View File

@@ -3,11 +3,11 @@
const variants = {
primary:
'px-4 py-2 text-sm font-medium text-white bg-blue-500 hover:bg-blue-600 rounded-xl transition-all duration-200 ease-in-out disabled:opacity-70 disabled:cursor-not-allowed',
'px-4 py-2 text-sm font-medium text-white bg-emerald-800 hover:bg-emerald-900 rounded-xl transition-all duration-200 ease-in-out disabled:opacity-70 disabled:cursor-not-allowed',
secondary:
'px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 hover:bg-gray-100 rounded-xl transition-all duration-200 ease-in-out',
danger:
'px-4 py-2 text-sm font-medium text-white bg-red-500 hover:bg-red-600 rounded-xl transition-all duration-200 ease-in-out disabled:opacity-70 disabled:cursor-not-allowed'
'px-4 py-2 text-sm font-medium text-white bg-red-800 hover:bg-red-900 rounded-xl transition-all duration-200 ease-in-out disabled:opacity-70 disabled:cursor-not-allowed'
};
type Props = {
@@ -25,7 +25,7 @@
{@render children()}
</a>
{:else}
<button class={variants[variant]} onclick={onClick} {disabled}>
<button style:cursor="pointer" class={variants[variant]} onclick={onClick} {disabled}>
{@render children()}
</button>
{/if}

View File

@@ -18,6 +18,7 @@ const config = {
warningFilter: (warning) => {
const ignoreCodes = [
'a11y_no_static_element_interactions',
'a11y_no_noninteractive_element_interactions',
'a11y_click_events_have_key_events'
];
return !ignoreCodes.includes(warning.code);