dev: hotfix
comps/pub/myui + updated data/types + updated data-table + updated nav-header + added toggle comps/pub/ui + updated button + updated toggle
This commit is contained in:
No files matched your search
@@ -0,0 +1,34 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, inject } from "vue"
|
||||
// import Toggle from '~/components/pub/ui/toggle/Toggle.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
label: string,
|
||||
providedKey?: string,
|
||||
variant?: 'default' | 'outline' | null | undefined
|
||||
}>()
|
||||
|
||||
const model = defineModel<boolean>()
|
||||
const provideKey = props.providedKey || 'toggle-provide'
|
||||
const { updateProvidedVal } = inject(provideKey)
|
||||
|
||||
watch(model, (newVal) => {
|
||||
updateProvidedVal(newVal)
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Button
|
||||
@click="() => model = !model"
|
||||
:variant="model ? 'default' : 'outline'"
|
||||
>
|
||||
{{ label }}
|
||||
</Button>
|
||||
<!-- <Toggle
|
||||
v-model="xval"
|
||||
:variant="variant ?? 'default'"
|
||||
:aria-label="label"
|
||||
>
|
||||
</Toggle> -->
|
||||
<!-- {{ xval }} -->
|
||||
</template>
|
||||
Reference in New Issue
Block a user