Files
ui/devtools/app/components/inputs/BooleanInput.vue
2024-12-23 12:13:37 +01:00

21 lines
448 B
Vue

<script lang="ts">
import * as z from 'zod'
export const booleanInputSchema = z.literal('boolean').or(z.object({
kind: z.literal('enum'),
type: z.string().refine((type) => {
return type.split('|').some(t => t.trim() === 'boolean')
})
}))
export type BooleanInputSchema = z.infer<typeof booleanInputSchema>
</script>
<script setup lang="ts">
defineProps<{ schema: BooleanInputSchema }>()
</script>
<template>
<USwitch />
</template>