fix(ui): make aria-pressed "true" when given as a prop to the Button component

This commit is contained in:
upsiflu 2024-12-16 12:08:43 +01:00
parent e583c51a54
commit 533cd4e21b
1 changed files with 3 additions and 1 deletions

View File

@ -18,6 +18,7 @@ type Props = {
onClick?: (...args: any[]) => void | Promise<void>
autofocus? : boolean
ariaPressed? : true
} & ColorProps & VariantProps
const props = defineProps<Props>()
@ -46,6 +47,7 @@ onMounted(() => {
<template>
<button ref="button"
:aria-pressed="props.ariaPressed"
v-bind="propsToColor({...props, interactive:true})"
class="funkwhale is-colored button"
:class="[
@ -132,7 +134,7 @@ onMounted(() => {
}
&.is-loading {
@extend .is-active;
@extend :active;
> span {
opacity: 0;