fix: update accessibility warning filters and enhance Button component styles
This commit is contained in:
@@ -3,11 +3,11 @@
|
|||||||
|
|
||||||
const variants = {
|
const variants = {
|
||||||
primary:
|
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:
|
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',
|
'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:
|
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 = {
|
type Props = {
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
{@render children()}
|
{@render children()}
|
||||||
</a>
|
</a>
|
||||||
{:else}
|
{:else}
|
||||||
<button class={variants[variant]} onclick={onClick} {disabled}>
|
<button style:cursor="pointer" class={variants[variant]} onclick={onClick} {disabled}>
|
||||||
{@render children()}
|
{@render children()}
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ const config = {
|
|||||||
warningFilter: (warning) => {
|
warningFilter: (warning) => {
|
||||||
const ignoreCodes = [
|
const ignoreCodes = [
|
||||||
'a11y_no_static_element_interactions',
|
'a11y_no_static_element_interactions',
|
||||||
|
'a11y_no_noninteractive_element_interactions',
|
||||||
'a11y_click_events_have_key_events'
|
'a11y_click_events_have_key_events'
|
||||||
];
|
];
|
||||||
return !ignoreCodes.includes(warning.code);
|
return !ignoreCodes.includes(warning.code);
|
||||||
|
|||||||
Reference in New Issue
Block a user