update icon enum to union

This commit is contained in:
Huakun Shen 2025-03-26 05:09:44 -04:00
parent 78dfaa6396
commit 1823ab2448
No known key found for this signature in database

View File

@ -11,7 +11,15 @@ export enum IconEnum {
Base64PNG = "base64-png", Base64PNG = "base64-png",
Text = "text" Text = "text"
} }
export const IconType = v.enum_(IconEnum) // export const IconType = v.enum(IconEnum)
export const IconType = v.union([
v.literal(IconEnum.Iconify),
v.literal(IconEnum.RemoteUrl),
v.literal(IconEnum.Svg),
v.literal(IconEnum.Base64PNG),
v.literal(IconEnum.Text)
])
export type IconType = v.InferOutput<typeof IconType> export type IconType = v.InferOutput<typeof IconType>
export type Icon = { export type Icon = {