1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 04:20:53 +01:00
metamask-extension/ui/components/component-library
George Marshall 5d17f86e02
Update Text import paths: component library/ (#19987)
* Updating component-librar import paths

* Updating snapshots

* Updates to AvatarBase story

* Updates to avatar and checkbox

* Updating last of the deprecated import paths

* Updating component-library snapshots from button-base

* Updating snapshots from rest of codebase to do with button-base

* Removing unneeded CSS

* Updating snapshots
2023-07-17 14:00:16 -07:00
..
avatar-account Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
avatar-base Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
avatar-favicon Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
avatar-icon Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
avatar-network Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
avatar-token Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
badge-wrapper Updating BadgeWrapper to use TS Box (#19769) 2023-07-14 13:05:00 -07:00
banner-alert Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
banner-base Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
banner-tip Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
box Fix memory based performance problem caused by use of lodash memoize in box component (#19993) 2023-07-13 12:23:10 -02:30
button Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
button-base Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
button-icon ButtonIcon background & ButtonBase disabled update (#19976) 2023-07-13 13:22:40 -07:00
button-link Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
button-primary Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
button-secondary Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
checkbox Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
form-text-field Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
header-base update TEXT_ALIGN to TextAlign in component-library folder (#19237) 2023-05-23 11:05:50 -07:00
help-text Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
icon Feat/15438/create ds checkbox component (#19808) 2023-07-14 11:50:47 -07:00
input Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
label Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
modal Adding Modal and updating ModalContent component (#19020) 2023-05-19 13:20:15 -07:00
modal-content Fix #19856 - Don't autoclose Modals when Popover items are clicked (#19857) 2023-07-05 10:11:49 -07:00
modal-focus Adding ModalFocus component (#18979) 2023-05-09 14:33:29 -07:00
modal-header Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
modal-overlay Some style, accessibility and sematic html updates to modal sub components (#19034) 2023-05-09 14:09:10 -07:00
picker-network Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
popover Issue 17670 replace typography with text (#19433) 2023-06-26 15:50:08 -07:00
popover-header Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
tag Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
tag-url Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
text Updating Text and import paths (#19949) 2023-07-14 10:59:30 -07:00
text-field Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
text-field-search Update Text import paths: component library/ (#19987) 2023-07-17 14:00:16 -07:00
component-library-components.scss Feat/15438/create ds checkbox component (#19808) 2023-07-14 11:50:47 -07:00
COMPONENT-LIBRARY.stories.mdx Updating component-library readme storybook render (#19359) 2023-06-05 21:23:25 +05:30
index.js Feat/15438/create ds checkbox component (#19808) 2023-07-14 11:50:47 -07:00
README.md Updating component-library readme storybook render (#19359) 2023-06-05 21:23:25 +05:30

Component Library

This folder contains design system components that are built 1:1 with the Figma DS Components UI kit and should be used where possible in all UI feature work.

Architecture

All components are built on top of the Box component and accept all Box component props

Layout

component-library components accept all utility props for layout

import { Text } from '../../component-library';

<Text marginBottom={4}>This text has a margin-bottom of 16px</Text>;

Polymorphic as prop

component-library components accept a polymorphic as prop to change the root html element of a component

import { Text } from '../../component-library';

<ul>
  <Text as="li">This renders as list item html element</Text>
</ul>;

TypeScript

We are currently in the process of migrating all component-library components to TypeScript. Feel free to contribute by creating a PR against one of these issues

Support

If internal folks have any questions please reach out the design system team via the internal slack channel #metamask-design-system 💁

DS components figma file