mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
16 lines
386 B
Vue
16 lines
386 B
Vue
<script lang="ts">
|
|
import { z } from 'zod'
|
|
|
|
export const stringInputSchema = z.literal('string').or(z.string().transform(t => t.split('|').find(s => s.trim() === 'string')).pipe(z.string()))
|
|
|
|
export type StringInputSchema = z.infer<typeof stringInputSchema>
|
|
</script>
|
|
|
|
<script setup lang="ts">
|
|
defineProps<{ schema: StringInputSchema }>()
|
|
</script>
|
|
|
|
<template>
|
|
<UInput />
|
|
</template>
|