"src/SequenceTuple.java" did not exist on "c87fe7f2afbf7760509b5452004e512b64320f3d"
Newer
Older
<template>
<button
:id="id"
type="button"
role="switch"
:aria-checked="value"
class="tw-appearance-none tw-border-0 tw-py-[.5em] tw-px-[1em] tw-ring-black tw-relative first:tw-rounded-l last:tw-rounded-r"
:class="{
'tw-bg-aura-primary tw-text-white': value,
'tw-bg-gray-100': !value,
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
'focus:tw-z-10 focus:tw-ring-2 focus:tw-brightness-95': true,
'hover:tw-brightness-90': true,
}"
tabindex="0"
@click="value = !value"
>
<slot>{{ label }}</slot>
</button>
</template>
<script lang="ts" setup>
import { computed } from 'vue'
import { useId } from '@/util'
const props = defineProps<{
modelValue: boolean
label?: string
}>()
const emit = defineEmits<{
(e: 'update:modelValue', value: boolean): void
}>()
const id = useId()
const value = computed({
get() {
return props.modelValue
},
set(value: boolean) {
emit('update:modelValue', value)
},
})
</script>
<script lang="ts">
export default {
compatConfig: {
MODE: 3,
},
}
</script>