diff --git a/ui/components/component-library/avatar-account/README.mdx b/ui/components/component-library/avatar-account/README.mdx
index cfea1c258..096c842ba 100644
--- a/ui/components/component-library/avatar-account/README.mdx
+++ b/ui/components/component-library/avatar-account/README.mdx
@@ -26,7 +26,7 @@ component props
Use the `size` prop and the `Size` object from `./ui/helpers/constants/design-system.js` to change the size of `AvatarAccount`
-Optional: `AVATAR_ACCOUNT_SIZES` from `./ui/components/component-library` object can be used instead of `SIZES`
+Optional: `AVATAR_ACCOUNT_SIZES` from `./ui/components/component-library` object can be used instead of `Size`
Possible sizes include:
@@ -36,10 +36,10 @@ Possible sizes include:
- `Size.LG` 40px
- `Size.XL` 48px
-Defaults to `SIZES.MD`
+Defaults to `Size.MD`
```jsx
diff --git a/ui/components/component-library/avatar-base/avatar-base.js b/ui/components/component-library/avatar-base/avatar-base.js
index c7891b440..cbaf77792 100644
--- a/ui/components/component-library/avatar-base/avatar-base.js
+++ b/ui/components/component-library/avatar-base/avatar-base.js
@@ -44,12 +44,12 @@ AvatarBase.propTypes = {
children: PropTypes.node,
/**
* The background color of the AvatarBase
- * Defaults to COLORS.BACKGROUND_ALTERNATIVE
+ * Defaults to Color.backgroundAlternative
*/
backgroundColor: Box.propTypes.backgroundColor,
/**
* The background color of the AvatarBase
- * Defaults to COLORS.BORDER_DEFAULT
+ * Defaults to Color.borderDefault
*/
borderColor: Box.propTypes.borderColor,
/**
diff --git a/ui/components/component-library/avatar-favicon/README.mdx b/ui/components/component-library/avatar-favicon/README.mdx
index c2bdb2fe5..55e74a823 100644
--- a/ui/components/component-library/avatar-favicon/README.mdx
+++ b/ui/components/component-library/avatar-favicon/README.mdx
@@ -37,10 +37,10 @@ Possible sizes include:
- `Size.LG` 40px
- `Size.XL` 48px
-Defaults to `SIZES.MD`
+Defaults to `Size.MD`
```jsx
diff --git a/ui/components/component-library/avatar-favicon/avatar-favicon.js b/ui/components/component-library/avatar-favicon/avatar-favicon.js
index 0d1fc1a14..1cd1d144b 100644
--- a/ui/components/component-library/avatar-favicon/avatar-favicon.js
+++ b/ui/components/component-library/avatar-favicon/avatar-favicon.js
@@ -71,7 +71,7 @@ AvatarFavicon.propTypes = {
size: PropTypes.oneOf(Object.values(AVATAR_FAVICON_SIZES)),
/**
* The border color of the AvatarFavicon
- * Defaults to COLORS.TRANSPARENT
+ * Defaults to Color.transparent
*/
borderColor: Box.propTypes.borderColor,
/**
diff --git a/ui/components/component-library/avatar-favicon/avatar-favicon.stories.js b/ui/components/component-library/avatar-favicon/avatar-favicon.stories.js
index ddc2c32ff..8b68a25cf 100644
--- a/ui/components/component-library/avatar-favicon/avatar-favicon.stories.js
+++ b/ui/components/component-library/avatar-favicon/avatar-favicon.stories.js
@@ -28,6 +28,9 @@ export default {
src: {
control: 'text',
},
+ name: {
+ control: 'text',
+ },
borderColor: {
options: Object.values(BorderColor),
control: 'select',
@@ -36,6 +39,7 @@ export default {
args: {
src: 'https://uniswap.org/favicon.ico',
size: Size.MD,
+ name: 'Uniswap',
},
};
diff --git a/ui/components/component-library/avatar-icon/README.mdx b/ui/components/component-library/avatar-icon/README.mdx
index be23a6db2..0e7b61e29 100644
--- a/ui/components/component-library/avatar-icon/README.mdx
+++ b/ui/components/component-library/avatar-icon/README.mdx
@@ -24,7 +24,7 @@ component props
### Size
-Use the `size` prop and the `SIZES` object from `./ui/helpers/constants/design-system.js` to change the size of `AvatarIcon`
+Use the `size` prop and the `Size` object from `./ui/helpers/constants/design-system.js` to change the size of `AvatarIcon`
Optional: `AVATAR_ICON_SIZES` from `./ui/components/component-library` object can be used instead of `Size`
@@ -36,10 +36,10 @@ Possible sizes include:
- `Size.LG` 40px
- `Size.XL` 48px
-Defaults to `SIZES.MD`
+Defaults to `Size.MD`
```jsx
diff --git a/ui/components/component-library/avatar-icon/avatar-icon.stories.js b/ui/components/component-library/avatar-icon/avatar-icon.stories.js
index 53fca2450..ba5c276a9 100644
--- a/ui/components/component-library/avatar-icon/avatar-icon.stories.js
+++ b/ui/components/component-library/avatar-icon/avatar-icon.stories.js
@@ -106,7 +106,7 @@ export const SizeStory = (args) => (
);
SizeStory.storyName = 'Size';
-Size.args = {
+SizeStory.args = {
iconName: ICON_NAMES.CONFIRMATION,
};
diff --git a/ui/components/component-library/avatar-network/README.mdx b/ui/components/component-library/avatar-network/README.mdx
index 15bab198e..92ad2e0e9 100644
--- a/ui/components/component-library/avatar-network/README.mdx
+++ b/ui/components/component-library/avatar-network/README.mdx
@@ -31,7 +31,7 @@ Possible sizes include:
Defaults to `md`
```jsx
diff --git a/ui/components/component-library/avatar-token/README.mdx b/ui/components/component-library/avatar-token/README.mdx
index 5b58853db..63e7e5b14 100644
--- a/ui/components/component-library/avatar-token/README.mdx
+++ b/ui/components/component-library/avatar-token/README.mdx
@@ -31,7 +31,7 @@ Possible sizes include:
Defaults to `md`
```jsx
diff --git a/ui/components/component-library/avatar-token/avatar-token.js b/ui/components/component-library/avatar-token/avatar-token.js
index c65aeb1b1..ef970c2f5 100644
--- a/ui/components/component-library/avatar-token/avatar-token.js
+++ b/ui/components/component-library/avatar-token/avatar-token.js
@@ -100,17 +100,17 @@ AvatarToken.propTypes = {
size: PropTypes.oneOf(Object.values(AVATAR_TOKEN_SIZES)),
/**
* The background color of the AvatarToken
- * Defaults to COLORS.BACKGROUND_ALTERNATIVE
+ * Defaults to Color.backgroundAlternative
*/
backgroundColor: Box.propTypes.backgroundColor,
/**
* The background color of the AvatarToken
- * Defaults to COLORS.BORDER_DEFAULT
+ * Defaults to Color.borderDefault
*/
borderColor: Box.propTypes.borderColor,
/**
* The color of the text inside the AvatarToken
- * Defaults to COLORS.TEXT_DEFAULT
+ * Defaults to Color.textDefault
*/
color: Box.propTypes.color,
/**
diff --git a/ui/components/component-library/avatar-with-badge/README.mdx b/ui/components/component-library/avatar-with-badge/README.mdx
index 2bb2d4c52..1587ddb5b 100644
--- a/ui/components/component-library/avatar-with-badge/README.mdx
+++ b/ui/components/component-library/avatar-with-badge/README.mdx
@@ -31,7 +31,7 @@ import { AvatarWithBadge } from '../ui/component-library';
badgePosition={AVATAR_WITH_BADGE_POSTIONS.BOTTOM}
badge={
@@ -39,7 +39,7 @@ import { AvatarWithBadge } from '../ui/component-library';
>
@@ -48,7 +48,7 @@ import { AvatarWithBadge } from '../ui/component-library';
badgePosition={AVATAR_WITH_BADGE_POSTIONS.TOP}
badge={
@@ -56,7 +56,7 @@ import { AvatarWithBadge } from '../ui/component-library';
>
diff --git a/ui/components/component-library/banner-alert/README.mdx b/ui/components/component-library/banner-alert/README.mdx
index b709c6195..275b66aa1 100644
--- a/ui/components/component-library/banner-alert/README.mdx
+++ b/ui/components/component-library/banner-alert/README.mdx
@@ -14,7 +14,7 @@ import { BannerBase } from '..';
The `BannerAlert` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props
-
+
The `BannerAlert` accepts all `BannerBase` component props below
diff --git a/ui/components/component-library/banner-alert/banner-alert.js b/ui/components/component-library/banner-alert/banner-alert.js
index a98528b3f..656685046 100644
--- a/ui/components/component-library/banner-alert/banner-alert.js
+++ b/ui/components/component-library/banner-alert/banner-alert.js
@@ -90,7 +90,7 @@ BannerAlert.propTypes = {
*/
severity: PropTypes.oneOf(Object.values(BANNER_ALERT_SEVERITIES)),
/**
- * Banner accepts all the props from BannerBase
+ * BannerAlert accepts all the props from BannerBase
*/
...BannerBase.propTypes,
};
diff --git a/ui/components/component-library/banner-base/README.mdx b/ui/components/component-library/banner-base/README.mdx
index 269b9b552..356842e0c 100644
--- a/ui/components/component-library/banner-base/README.mdx
+++ b/ui/components/component-library/banner-base/README.mdx
@@ -128,12 +128,12 @@ Use the `startAccessory` prop to add components such as icons or fox image to th
```jsx
-import { SIZES } from '../../../helpers/constants/design-system';
+import { Size } from '../../../helpers/constants/design-system';
import { BannerBase, Icon, ICON_NAMES } from '../../component-library';
}
+ startAccessory={}
>
The info icon on the left is passed through the startAccessory prop
;
diff --git a/ui/components/component-library/button-base/README.mdx b/ui/components/component-library/button-base/README.mdx
index fc016a37d..2501b7d15 100644
--- a/ui/components/component-library/button-base/README.mdx
+++ b/ui/components/component-library/button-base/README.mdx
@@ -19,19 +19,19 @@ The `ButtonBase` accepts all props below as well as all [Box](/docs/components-u
### Size
-Use the `size` prop and the `SIZES` object from `./ui/helpers/constants/design-system.js`
-to change the size of `ButtonBase`. Defaults to `SIZES.MD`
+Use the `size` prop and the `Size` object from `./ui/helpers/constants/design-system.js`
+to change the size of `ButtonBase`. Defaults to `Size.MD`
-Optional: `BUTTON_BASE_SIZES` from `./button-base` object can be used instead of `SIZES`.
+Optional: `BUTTON_BASE_SIZES` from `./button-base` object can be used instead of `Size`.
Possible sizes include:
-- `SIZES.SM` 32px
-- `SIZES.MD` 40px
-- `SIZES.LG` 48px
+- `Size.SM` 32px
+- `Size.MD` 40px
+- `Size.LG` 48px
```jsx
diff --git a/ui/components/component-library/button-icon/README.mdx b/ui/components/component-library/button-icon/README.mdx
index fba8c4ecf..c41f088ae 100644
--- a/ui/components/component-library/button-icon/README.mdx
+++ b/ui/components/component-library/button-icon/README.mdx
@@ -34,10 +34,10 @@ import { ICON_NAMES } from '../icon';
### Size
-Use the `size` prop and the `SIZES` object from `./ui/helpers/constants/design-system.js`
-to change the size of `ButtonIcon`. Defaults to `SIZES.SM`
+Use the `size` prop and the `Size` object from `./ui/helpers/constants/design-system.js`
+to change the size of `ButtonIcon`. Defaults to `Size.SM`
-Optional: `BUTTON_ICON_SIZES` from `./button-icon` object can be used instead of `SIZES`.
+Optional: `BUTTON_ICON_SIZES` from `./button-icon` object can be used instead of `Size`.
Possible sizes include:
@@ -45,7 +45,7 @@ Possible sizes include:
- `Size.LG` 32px
```jsx
@@ -65,11 +65,12 @@ Use the `ariaLabel` prop to set the name of the ButtonIcon for proper accessibil
```jsx
-import { ButtonIcon } from '../ui/component-library';
+import { ButtonIcon, ICON_NAMES } from '../ui/component-library';
+import { Color } from '../../../helpers/constants/design-system';
-
+
```
### As
@@ -86,11 +87,12 @@ Button `as` options:
```jsx
-import { ButtonIcon } from '../ui/component-library';
+import { ButtonIcon, ICON_NAMES } from '../ui/component-library';
+import { Color } from '../../../helpers/constants/design-system';
-
+
```
### Href
@@ -102,31 +104,33 @@ When an `href` prop is passed it will change the element to an anchor(`a`) tag.
```jsx
-import { ButtonIcon } from '../ui/component-library';
+import { ButtonIcon, ICON_NAMES } from '../ui/component-library';
+import { Color } from '../../../helpers/constants/design-system';
;
```
### Color
-Use the `color` prop and the `COLORS` object to change the color of the `ButtonIcon`. Defaults to `COLORS.ICON_DEFAULT`.
+Use the `color` prop and the `Color` object to change the color of the `ButtonIcon`. Defaults to `Color.iconDefault`.
```jsx
-import { ButtonIcon } from '../ui/component-library';
+import { ButtonIcon, ICON_NAMES } from '../ui/component-library';
+import { Color } from '../../../helpers/constants/design-system';
;
```
diff --git a/ui/components/component-library/button-link/README.mdx b/ui/components/component-library/button-link/README.mdx
index 1ea3bccab..4e88326e2 100644
--- a/ui/components/component-library/button-link/README.mdx
+++ b/ui/components/component-library/button-link/README.mdx
@@ -23,9 +23,9 @@ The `ButtonLink` accepts all [ButtonBase](/docs/components-componentlibrary-butt
### Size
-Use the `size` prop and the `Size` object from `./ui/helpers/constants/design-system.js` to change the size of `ButtonLink`. Defaults to `SIZES.AUTO`.
+Use the `size` prop and the `Size` object from `./ui/helpers/constants/design-system.js` to change the size of `ButtonLink`. Defaults to `Size.auto`.
-Optional: `BUTTON_LINK_SIZES` from `../../component-library` object can be used instead of `SIZES`
+Optional: `BUTTON_LINK_SIZES` from `../../component-library` object can be used instead of `Size`
Possible sizes include:
@@ -36,7 +36,7 @@ Possible sizes include:
- `Size.inherit` inherits the font-size of the parent element. Used for inline links in paragraphs.
```jsx
@@ -57,18 +57,18 @@ import { ButtonLink, Text, TextVariant } from '../../component-library';
- Inherits the font-size of the parent element. Learn more
+ Inherits the font-size of the parent element. Learn more
- Inherits the font-size of the parent element. Learn more
+ Inherits the font-size of the parent element. Learn more
- Inherits the font-size of the parent element. Learn more
+ Inherits the font-size of the parent element. Learn more
Inherits the font-size of the parent element and example with textProps override for a success color.
- Learn more
+ Learn more
```
@@ -103,7 +103,7 @@ import { ButtonLink } from '../../component-library';
### Hit area
-The default hit area for `ButtonLink` is the width of the text and height based on the `size` prop which is set to `SIZES.AUTO` by default. There may be times when you want to increase the hit area of the `ButtonLink`. To do this you can use the `Box` props `paddingLeft` and `paddingRight`. Or alternatively you can use the `block` prop which sets the width to 100%.
+The default hit area for `ButtonLink` is the width of the text and height based on the `size` prop which is set to `Size.auto` by default. There may be times when you want to increase the hit area of the `ButtonLink`. To do this you can use the `Box` props `paddingLeft` and `paddingRight`. Or alternatively you can use the `block` prop which sets the width to 100%.
```jsx
-import { COLORS, SIZES, DISPLAY } from '../../../helpers/constants/design-system';
+import { Color, DISPLAY } from '../../../helpers/constants/design-system';
import { ButtonIcon, Icon, ICON_NAMES, TextFieldBase } from '../../component-library';
}
@@ -110,7 +110,7 @@ import { ButtonIcon, Icon, ICON_NAMES, TextFieldBase } from '../../component-lib
}
/>
@@ -131,7 +131,7 @@ import { ButtonIcon, Icon, ICON_NAMES, TextFieldBase } from '../../component-lib
isAddressValid && (
)
}
@@ -208,16 +208,17 @@ To function fully the custom component should accept the following props:
```jsx
import { TextFieldBase, Icon, ICON_NAMES } from '../../component-library';
+import { Size } from '../../../helpers/constants/design-system';
// should map the props to the custom input component
const CustomInputComponent = () =>
{/* Custom input component */}
;
const TextFieldCustomInput = (args) => (
+
}
/>
);
diff --git a/ui/components/component-library/text-field-search/README.mdx b/ui/components/component-library/text-field-search/README.mdx
index 5576376ba..76ba2541d 100644
--- a/ui/components/component-library/text-field-search/README.mdx
+++ b/ui/components/component-library/text-field-search/README.mdx
@@ -71,11 +71,7 @@ Use the `clearButtonProps` to access other props of the clear button.
```jsx
import React, { useState } from 'react';
-import {
- SIZES,
- COLORS,
- BORDER_RADIUS,
-} from '../../../helpers/constants/design-system';
+import { Color, BorderRadius } from '../../../helpers/constants/design-system';
import { TextFieldSearch } from '../../component-library';
@@ -94,8 +90,8 @@ const handleOnClear = () => {
onChange={handleOnChange}
clearButtonOnClick={handleOnClear}
clearButtonProps={{
- backgroundColor: COLORS.BACKGROUND_ALTERNATIVE,
- borderRadius: BORDER_RADIUS.XS,
+ backgroundColor: Color.backgroundAlternative,
+ borderRadius: BorderRadius.XS,
'data-testid': 'clear-button',
}}
/>;
diff --git a/ui/components/component-library/text-field/README.mdx b/ui/components/component-library/text-field/README.mdx
index 8932cc451..f51288f1b 100644
--- a/ui/components/component-library/text-field/README.mdx
+++ b/ui/components/component-library/text-field/README.mdx
@@ -67,11 +67,7 @@ Use the `clearButtonProps` to access other props of the clear button.
```jsx
import React, { useState } from 'react';
-import {
- SIZES,
- COLORS,
- BORDER_RADIUS,
-} from '../../../helpers/constants/design-system';
+import { Color, BorderRadius } from '../../../helpers/constants/design-system';
import { TextField } from '../../component-library';
@@ -92,8 +88,8 @@ const handleOnClear = () => {
showClearButton
clearButtonOnClick={handleOnClear}
clearButtonProps={{
- backgroundColor: COLORS.BACKGROUND_ALTERNATIVE,
- borderRadius: BORDER_RADIUS.XS,
+ backgroundColor: Color.backgroundAlternative,
+ borderRadius: BorderRadius.XS,
'data-testid': 'clear-button',
}}
/>;
diff --git a/ui/components/ui/box/README.mdx b/ui/components/ui/box/README.mdx
index 8bf463000..c4a0a2ef6 100644
--- a/ui/components/ui/box/README.mdx
+++ b/ui/components/ui/box/README.mdx
@@ -14,43 +14,43 @@ Box is a utility component that can be used for layout or as a base for other UI
## Props
-| Name | Description | Default |
-| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
-| children | The children of the Box component. If `function` type will render the child as the Box node instead of a child of the Box | - |
-| className | Additional className of the Box component | - |
-| margin | 0, 1, 2, 4, 6, 8, 9, 10, 12, 'auto' or array of values [1, 2, 'auto'] for responsive props | - |
-| marginTop | 0, 1, 2, 4, 6, 8, 9, 10, 12, 'auto' or array of values for responsive props | - |
-| marginBottom | 0, 1, 2, 4, 6, 8, 9, 10, 12, 'auto' or array of values for responsive props | - |
-| marginRight | 0, 1, 2, 4, 6, 8, 9, 10, 12, 'auto' or array of values for responsive props | - |
-| marginLeft | 0, 1, 2, 4, 6, 8, 9, 10, 12, 'auto' or array of values for responsive props | - |
-| marginInline | 0, 1, 2, 4, 6, 8, 9, 10, 12, 'auto' or array of values for responsive props | - |
-| marginInlineStart| 0, 1, 2, 4, 6, 8, 9, 10, 12, 'auto' or array of values for responsive props | - |
-| marginInlineEnd | 0, 1, 2, 4, 6, 8, 9, 10, 12, 'auto' or array of values for responsive props | - |
-| padding | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
-| paddingTop | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
-| paddingBottom | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
-| paddingRight | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
-| paddingLeft | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
-| paddingInline | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
-| paddingInlineStart | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
-| paddingInlineEnd | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
+| Name | Description | Default |
+| ------------------ | ------------------------------------------------------------------------------------------------------------------------- | ------- |
+| children | The children of the Box component. If `function` type will render the child as the Box node instead of a child of the Box | - |
+| className | Additional className of the Box component | - |
+| margin | 0, 1, 2, 4, 6, 8, 9, 10, 12, 'auto' or array of values [1, 2, 'auto'] for responsive props | - |
+| marginTop | 0, 1, 2, 4, 6, 8, 9, 10, 12, 'auto' or array of values for responsive props | - |
+| marginBottom | 0, 1, 2, 4, 6, 8, 9, 10, 12, 'auto' or array of values for responsive props | - |
+| marginRight | 0, 1, 2, 4, 6, 8, 9, 10, 12, 'auto' or array of values for responsive props | - |
+| marginLeft | 0, 1, 2, 4, 6, 8, 9, 10, 12, 'auto' or array of values for responsive props | - |
+| marginInline | 0, 1, 2, 4, 6, 8, 9, 10, 12, 'auto' or array of values for responsive props | - |
+| marginInlineStart | 0, 1, 2, 4, 6, 8, 9, 10, 12, 'auto' or array of values for responsive props | - |
+| marginInlineEnd | 0, 1, 2, 4, 6, 8, 9, 10, 12, 'auto' or array of values for responsive props | - |
+| padding | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
+| paddingTop | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
+| paddingBottom | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
+| paddingRight | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
+| paddingLeft | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
+| paddingInline | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
+| paddingInlineStart | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
+| paddingInlineEnd | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
-| display | DISPLAY values or array of DISPLAY values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
-| flexDirection | FLEX_DIRECTION values or array of FLEX_DIRECTION values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | FLEX_DIRECTION.ROW |
-| flexWrap | FLEX_WRAP values or array of FLEX_WRAP values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
-| alignItems | ALIGN_ITEMS values or array of ALIGN_ITEMS values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
-| justifyContent | JUSTIFY_CONTENT values or array of JUSTIFY_CONTENT values from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
-| gap | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
-| textAlign | TEXT_ALIGN values or array of TEXT_ALIGN values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
-| width | BLOCK_SIZES values or array of BLOCK_SIZES values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
-| height | BLOCK_SIZES values or array of BLOCK_SIZES values for responsive props [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
-| color | Color values or array of Color values for responsive props [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
-| backgroundColor | BackgroundColor values or array of BackgroundColor values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
-| borderColor | BorderColor values or array of BorderColor values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
-| borderWidth | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
-| borderRadius | BORDER_RADIUS values or array of BORDER_RADIUS values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
-| borderStyle | BORDER_STYLE values or array of BORDER_STYLE values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
-| as | The polymorphic `as` prop allows you to change the root HTML element of the Box component. Defaults to 'div' | 'div' |
+| display | DISPLAY values or array of DISPLAY values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
+| flexDirection | FLEX_DIRECTION values or array of FLEX_DIRECTION values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | FLEX_DIRECTION.ROW |
+| flexWrap | FLEX_WRAP values or array of FLEX_WRAP values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
+| alignItems | AlignItems values or array of AlignItems values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
+| justifyContent | JustifyContent values or array of JustifyContent values from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
+| gap | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
+| textAlign | TEXT_ALIGN values or array of TEXT_ALIGN values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
+| width | BLOCK_SIZES values or array of BLOCK_SIZES values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
+| height | BLOCK_SIZES values or array of BLOCK_SIZES values for responsive props [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
+| color | Color values or array of Color values for responsive props [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
+| backgroundColor | BackgroundColor values or array of BackgroundColor values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
+| borderColor | BorderColor values or array of BorderColor values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
+| borderWidth | 0, 1, 2, 4, 6, 8, 9, 10, 12 or array of numbers [1, 2] for responsive props | - |
+| borderRadius | BorderRadius values or array of BorderRadius values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
+| borderStyle | BORDER_STYLE values or array of BORDER_STYLE values for responsive props from [../ui/helpers/constants/design-system.js](https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/constants/design-system.js) | - |
+| as | The polymorphic `as` prop allows you to change the root HTML element of the Box component. Defaults to 'div' | 'div' |
## Usage
@@ -145,13 +145,13 @@ import Box from '../ui/box';
### Color
-The `color` prop can be used to set the color of the content in Box component. The `color` prop accepts [responsive props](#responsive-props) in the form of array props. Defaults to `COLORS.TEXT_DEFAULT`
+The `color` prop can be used to set the color of the content in Box component. The `color` prop accepts [responsive props](#responsive-props) in the form of array props. Defaults to `Color.textDefault`.
-
+
-Example of importing `COLORS` object with `Box` component
+Example of importing `TextColor` object with `Box` component
```jsx
import { TextColor } from '../../../helpers/constants/design-system';
@@ -162,54 +162,65 @@ import Box from '../ui/box';
### Background Color
-Use the `backgroundColor` prop along with the `COLORS` object from `ui/helpers/constants/design-system.js` to change background color. The `backgroundColor` prop accepts [responsive props](#responsive-props) in the form of array props.
+Use the `backgroundColor` prop along with the `Color` or `BackgroundColor` object from `ui/helpers/constants/design-system.js` to change background color. The `backgroundColor` prop accepts [responsive props](#responsive-props) in the form of array props.
-
+
-Example of importing `COLORS` object with `Box` component
+Example of importing `BackgroundColor` object with `Box` component
```jsx
-import { BackgroundColor, TextColor } from '../../../helpers/constants/design-system';
+import {
+ BackgroundColor,
+ TextColor,
+} from '../../../helpers/constants/design-system';
import Box from '../ui/box';
- COLORS.BACKGROUND_DEFAULT
+
+ BackgroundColor.backgroundDefault
+ ;
```
### Border Color
-Use the `borderColor` prop along with the `COLORS` object from `ui/helpers/constants/design-system.js` to change border color. The `borderColor` prop accepts [responsive props](#responsive-props) in the form of array props.
+Use the `borderColor` prop along with the `Color` or `BorderColor` object from `ui/helpers/constants/design-system.js` to change border color. The `borderColor` prop accepts [responsive props](#responsive-props) in the form of array props.
-
+
Example of importing `BorderColor` object with `Box` component
```jsx
-import { BackgroundColor, BorderColor, TextColor } from '../../../helpers/constants/design-system';
+import {
+ BackgroundColor,
+ BorderColor,
+ TextColor,
+} from '../../../helpers/constants/design-system';
import Box from '../ui/box';
- COLORS.BORDER_DEFAULT
+
+ BorderColor.borderDefault
+ ;
```
### Border Radius
-Use the `borderRadius` prop along with the `BORDER_RADIUS` object from `ui/helpers/constants/design-system.js` to change border radius. The `borderRadius` prop accepts [responsive props](#responsive-props) in the form of array props.
+Use the `borderRadius` prop along with the `BorderRadius` object from `ui/helpers/constants/design-system.js` to change border radius. The `borderRadius` prop accepts [responsive props](#responsive-props) in the form of array props.
-
+
-Example of importing `BORDER_RADIUS` object with `Box` component
+Example of importing `BorderRadius` object with `Box` component
```jsx
import { BorderRadius } from '../../../helpers/constants/design-system';
@@ -251,7 +262,10 @@ The box component provides a responsive props api in the form of array props. Ar
```jsx
-import { BorderColor, BackgroundColor } from '../../../helpers/constants/design-system';
+import {
+ BorderColor,
+ BackgroundColor,
+} from '../../../helpers/constants/design-system';
import Box from '../ui/box';
{
{
};
BorderColorStory.storyName = 'BorderColor';
-export const BorderRadiusStories = () => {
+export const BorderRadiusStory = () => {
return (
<>
{
>
);
};
-BorderRadiusStories.storyName = 'BorderRadius';
+BorderRadiusStory.storyName = 'BorderRadius';
export const ResponsiveProps = () => {
return (
diff --git a/ui/components/ui/card/README.mdx b/ui/components/ui/card/README.mdx
index b729b592c..abb651155 100644
--- a/ui/components/ui/card/README.mdx
+++ b/ui/components/ui/card/README.mdx
@@ -27,7 +27,7 @@ The Card component has a set of default props that should meet most card use cas
That being said all props can be overwritten if necessary.
```jsx
-import { COLORS } from '../../../helpers/constants/design-system';
+import { Color } from '../../../helpers/constants/design-system';
// To remove the border
@@ -38,5 +38,5 @@ import { COLORS } from '../../../helpers/constants/design-system';
// All padding related props of the Box component will work
// To change the background color
-
+
```
diff --git a/ui/components/ui/card/card.js b/ui/components/ui/card/card.js
index 99a0e5558..cbff9dcc2 100644
--- a/ui/components/ui/card/card.js
+++ b/ui/components/ui/card/card.js
@@ -49,7 +49,7 @@ Card.propTypes = {
padding: Box.propTypes.padding,
/**
* The background color of the card
- * Defaults to COLORS.BACKGROUND_DEFAULT
+ * Defaults to Color.backgroundDefault
*/
backgroundColor: Box.propTypes.backgroundColor,
/**
diff --git a/ui/components/ui/icon/README.mdx b/ui/components/ui/icon/README.mdx
index 7b8ab0711..4bc4f1493 100644
--- a/ui/components/ui/icon/README.mdx
+++ b/ui/components/ui/icon/README.mdx
@@ -31,7 +31,7 @@ The following describes the props and example usage for this component.
Use the `size` prop to change the size of the icon it should adhere to an `8px` grid e.g. `16px`, `24px`, `32px`
-
+
### Color
diff --git a/ui/components/ui/typography/README.mdx b/ui/components/ui/typography/README.mdx
index 2b2306170..92f5350d2 100644
--- a/ui/components/ui/typography/README.mdx
+++ b/ui/components/ui/typography/README.mdx
@@ -72,7 +72,7 @@ Use the `color` prop and the `COLOR` object from `./ui/helpers/constants/design-
```jsx
// If importing from ui/components/app/[YOUR_COMPONENT]/ directory
import Typography from '../../ui/typography';
-import { TextColor, Colors, BackgroundColor } from '../../../helpers/constants/design-system';
+import { TextColor, Color, BackgroundColor } from '../../../helpers/constants/design-system';
text-default
@@ -83,7 +83,7 @@ import { TextColor, Colors, BackgroundColor } from '../../../helpers/constants/d
text-muted
-
+
overlay-inverse
@@ -308,16 +308,16 @@ Use the `boxProps` prop object to pass any valid [Box](/?path=/story/components-
```jsx
// If importing from ui/components/app/[YOUR_COMPONENT]/ directory
import Typography from '../../ui/typography';
-import { COLORS } from '../../../helpers/constants/design-system';
+import { Color } from '../../../helpers/constants/design-system';
This uses the boxProps prop
;
diff --git a/ui/components/ui/typography/typography.js b/ui/components/ui/typography/typography.js
index 19cbabccb..dd395a5c9 100644
--- a/ui/components/ui/typography/typography.js
+++ b/ui/components/ui/typography/typography.js
@@ -23,6 +23,7 @@ export const ValidColors = [
Color.errorDefault,
Color.errorInverse,
Color.successDefault,
+ Color.successInverse,
Color.sepoliaInverse,
Color.warningDefault,
Color.warningInverse,
@@ -30,7 +31,7 @@ export const ValidColors = [
Color.infoInverse,
Color.goerli,
Color.sepolia,
- Color.goerli,
+ Color.goerliInverse,
Color.sepoliaInverse,
];