fix(ui): make aria-pressed "true" when given as a prop to the Button component
This commit is contained in:
parent
e583c51a54
commit
533cd4e21b
|
@ -18,6 +18,7 @@ type Props = {
|
||||||
onClick?: (...args: any[]) => void | Promise<void>
|
onClick?: (...args: any[]) => void | Promise<void>
|
||||||
|
|
||||||
autofocus? : boolean
|
autofocus? : boolean
|
||||||
|
ariaPressed? : true
|
||||||
} & ColorProps & VariantProps
|
} & ColorProps & VariantProps
|
||||||
|
|
||||||
const props = defineProps<Props>()
|
const props = defineProps<Props>()
|
||||||
|
@ -46,6 +47,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<button ref="button"
|
<button ref="button"
|
||||||
|
:aria-pressed="props.ariaPressed"
|
||||||
v-bind="propsToColor({...props, interactive:true})"
|
v-bind="propsToColor({...props, interactive:true})"
|
||||||
class="funkwhale is-colored button"
|
class="funkwhale is-colored button"
|
||||||
:class="[
|
:class="[
|
||||||
|
@ -132,7 +134,7 @@ onMounted(() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-loading {
|
&.is-loading {
|
||||||
@extend .is-active;
|
@extend :active;
|
||||||
|
|
||||||
> span {
|
> span {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
Loading…
Reference in New Issue