diff --git a/packages/snaps-sdk/src/jsx/components/Icon.ts b/packages/snaps-sdk/src/jsx/components/Icon.ts index cb0dae69b0..9b07446792 100644 --- a/packages/snaps-sdk/src/jsx/components/Icon.ts +++ b/packages/snaps-sdk/src/jsx/components/Icon.ts @@ -278,6 +278,17 @@ export enum IconName { X = 'x', } +/** + * The colors available to the {@link Link} component. + */ +export type IconColor = + | 'default' + | 'primary' + | 'muted' + | 'error' + | 'success' + | 'warning'; + /** * The props of the {@link Icon} component. * @@ -288,7 +299,7 @@ export enum IconName { */ export type IconProps = { name: `${IconName}`; - color?: 'default' | 'primary' | 'muted' | undefined; + color?: IconColor | undefined; size?: 'md' | 'inherit' | undefined; }; diff --git a/packages/snaps-sdk/src/jsx/validation.ts b/packages/snaps-sdk/src/jsx/validation.ts index 2dab4873c1..d7fcdfda40 100644 --- a/packages/snaps-sdk/src/jsx/validation.ts +++ b/packages/snaps-sdk/src/jsx/validation.ts @@ -256,7 +256,14 @@ const IconNameStruct: Struct<`${IconName}`, null> = nullUnion( export const IconStruct: Describe = element('Icon', { name: IconNameStruct, color: optional( - nullUnion([literal('default'), literal('primary'), literal('muted')]), + nullUnion([ + literal('default'), + literal('primary'), + literal('muted'), + literal('error'), + literal('success'), + literal('warning'), + ]), ), size: optional(nullUnion([literal('md'), literal('inherit')])), });