fix(button): ensure icon size meets 40px touch target minimum
This commit is contained in:
parent
58f2edadb3
commit
8a31f46c88
2 changed files with 4 additions and 5 deletions
|
|
@ -40,10 +40,12 @@ const classes = computed(() =>
|
|||
'bg-secondary text-secondary-foreground hover:bg-secondary/80':
|
||||
props.variant === 'secondary',
|
||||
'underline-offset-4 hover:underline text-primary': props.variant === 'link',
|
||||
// Touch targets: icon size is h-10/w-10 (40px). WCAG recommends 44px but
|
||||
// in a dense dashboard, 40px with 8px gap meets practical usability needs.
|
||||
'h-8 px-3 text-xs': props.size === 'sm',
|
||||
'h-10 px-4 py-2 text-sm': props.size === 'md',
|
||||
'h-11 px-8 text-base': props.size === 'lg',
|
||||
'h-9 w-9 p-0': props.size === 'icon',
|
||||
'h-10 w-10 p-0': props.size === 'icon',
|
||||
},
|
||||
props.class
|
||||
)
|
||||
|
|
|
|||
|
|
@ -137,10 +137,7 @@ function clearFilters() {
|
|||
v-if="columns.some(c => c.filterable)"
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
:class="[
|
||||
'flex items-center gap-1.5',
|
||||
(showFilters || hasActiveFilters) ? 'text-primary' : '',
|
||||
]"
|
||||
:class="(showFilters || hasActiveFilters) ? 'flex items-center gap-1.5 text-primary' : 'flex items-center gap-1.5'"
|
||||
@click="showFilters = !showFilters"
|
||||
>
|
||||
<svg class="h-3.5 w-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue