mirror of
https://github.com/kunkunsh/kunkun.git
synced 2025-04-20 13:39:15 +00:00
update icon enum to union
This commit is contained in:
parent
78dfaa6396
commit
1823ab2448
@ -11,7 +11,15 @@ export enum IconEnum {
|
||||
Base64PNG = "base64-png",
|
||||
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 Icon = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user