Files
ui/devtools/app/components/inputs/BooleanInput.vue
Romain Hamel 701c75a2a8 feat(module): devtools integration (#2196)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2024-11-05 22:17:56 +01:00

21 lines
447 B
Vue

<script lang="ts">
import { 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>