mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
5d17f86e02
* 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 |
||
---|---|---|
.. | ||
avatar-account | ||
avatar-base | ||
avatar-favicon | ||
avatar-icon | ||
avatar-network | ||
avatar-token | ||
badge-wrapper | ||
banner-alert | ||
banner-base | ||
banner-tip | ||
box | ||
button | ||
button-base | ||
button-icon | ||
button-link | ||
button-primary | ||
button-secondary | ||
checkbox | ||
form-text-field | ||
header-base | ||
help-text | ||
icon | ||
input | ||
label | ||
modal | ||
modal-content | ||
modal-focus | ||
modal-header | ||
modal-overlay | ||
picker-network | ||
popover | ||
popover-header | ||
tag | ||
tag-url | ||
text | ||
text-field | ||
text-field-search | ||
component-library-components.scss | ||
COMPONENT-LIBRARY.stories.mdx | ||
index.js | ||
README.md |
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 💁