1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui/components/component-library
2023-06-05 21:25:20 +05:30
..
avatar-account
avatar-base Replacing deprecated constants with enums (#19242) 2023-06-05 21:25:20 +05:30
avatar-favicon Part of #18714: Replacing deprecated constants in Avatar-Favicon folder (#19332) 2023-06-01 10:09:08 -07:00
avatar-icon
avatar-network
avatar-token
badge-wrapper
banner-alert
banner-base Deprecated Icon and ButtonIcon clean up (#19220) 2023-05-19 10:33:02 -07:00
banner-tip
button
button-base
button-icon Deprecated Icon and ButtonIcon clean up (#19220) 2023-05-19 10:33:02 -07:00
button-link
button-primary
button-secondary
form-text-field Replacing Deprecated Constants (#19333) 2023-06-01 09:33:11 -07:00
header-base update TEXT_ALIGN to TextAlign in component-library folder (#19237) 2023-05-23 11:05:50 -07:00
help-text
icon Part of #18714: Replacing deprecated constants in Icon folder (#19250) 2023-05-25 13:53:31 -07:00
input
label
modal Adding Modal and updating ModalContent component (#19020) 2023-05-19 13:20:15 -07:00
modal-content Adding Modal and updating ModalContent component (#19020) 2023-05-19 13:20:15 -07:00
modal-focus Adding ModalFocus component (#18979) 2023-05-09 14:33:29 -07:00
modal-header Part of #18714: Replacing deprecated constants in Modal-Header folder (#19339) 2023-05-31 10:12:21 -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
popover Changes to Popover folder (#19245) 2023-05-29 16:16:11 -07:00
popover-header Add DS Popover component (#18805) 2023-05-19 11:49:53 -07:00
tag
tag-url
text Replacing deprecated constants with enums (#19242) 2023-06-05 21:25:20 +05:30
text-field Deprecated Icon and ButtonIcon clean up (#19220) 2023-05-19 10:33:02 -07:00
text-field-search Fixes clear button size TextFieldSearch (#19153) 2023-05-16 13:15:13 -07:00
component-library-components.scss Add DS Popover component (#18805) 2023-05-19 11:49:53 -07:00
COMPONENT-LIBRARY.stories.mdx Updating component-library readme storybook render (#19359) 2023-06-05 21:23:25 +05:30
index.js Adding Modal and updating ModalContent component (#19020) 2023-05-19 13:20:15 -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