Skip to content

Commit 1d42547

Browse files
Add theme property to Icon schema (#1290)
Co-authored-by: Konstantin Konstantinov <KKonstantinov@users.noreply.github.com>
1 parent 54303b4 commit 1d42547

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/types.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,15 @@ export const IconSchema = z.object({
279279
*
280280
* If not provided, the client should assume that the icon can be used at any size.
281281
*/
282-
sizes: z.array(z.string()).optional()
282+
sizes: z.array(z.string()).optional(),
283+
/**
284+
* Optional specifier for the theme this icon is designed for. `light` indicates
285+
* the icon is designed to be used with a light background, and `dark` indicates
286+
* the icon is designed to be used with a dark background.
287+
*
288+
* If not provided, the client should assume the icon can be used with any theme.
289+
*/
290+
theme: z.enum(['light', 'dark']).optional()
283291
});
284292

285293
/**

0 commit comments

Comments
 (0)