mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
21 lines
448 B
Vue
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>
|