File size: 269 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import { z } from "zod";
// Schema
export const urlSchema = z.object({
label: z.string(),
href: z.literal("").or(z.string().url()),
});
// Type
export type URL = z.infer<typeof urlSchema>;
// Defaults
export const defaultUrl: URL = {
label: "",
href: "",
};
|