Skip to content

Commit 1823ab2

Browse files
committed
update icon enum to union
1 parent 78dfaa6 commit 1823ab2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/api/src/models/icon.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,15 @@ export enum IconEnum {
1111
Base64PNG = "base64-png",
1212
Text = "text"
1313
}
14-
export const IconType = v.enum_(IconEnum)
14+
// export const IconType = v.enum(IconEnum)
15+
export const IconType = v.union([
16+
v.literal(IconEnum.Iconify),
17+
v.literal(IconEnum.RemoteUrl),
18+
v.literal(IconEnum.Svg),
19+
v.literal(IconEnum.Base64PNG),
20+
v.literal(IconEnum.Text)
21+
])
22+
1523
export type IconType = v.InferOutput<typeof IconType>
1624

1725
export type Icon = {

0 commit comments

Comments
 (0)