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-07-13 12:23:10 -02:30
..
avatar-account
avatar-base Replacing deprecated constants with enums (#19242) 2023-06-05 21:25:20 +05:30
avatar-favicon
avatar-icon
avatar-network
avatar-token
badge-wrapper
banner-alert Swaps UI update (#19169) 2023-06-15 20:17:21 +02:00
banner-base Swaps UI update (#19169) 2023-06-15 20:17:21 +02:00
banner-tip Swaps UI update (#19169) 2023-06-15 20:17:21 +02: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 ButtonBase text variant and fix font smoothing (#19883) 2023-07-12 07:37:33 -07:00
button-base Update ButtonBase text variant and fix font smoothing (#19883) 2023-07-12 07:37:33 -07:00
button-icon
button-link Update ButtonBase text variant and fix font smoothing (#19883) 2023-07-12 07:37:33 -07:00
button-primary Update ButtonBase text variant and fix font smoothing (#19883) 2023-07-12 07:37:33 -07:00
button-secondary Update ButtonBase text variant and fix font smoothing (#19883) 2023-07-12 07:37:33 -07:00
form-text-field
header-base
help-text
icon
input
label Update Label component font weight from bold to medium (#19731) 2023-06-27 01:29:04 +05:30
modal
modal-content Fix #19856 - Don't autoclose Modals when Popover items are clicked (#19857) 2023-07-05 10:11:49 -07:00
modal-focus
modal-header
modal-overlay
picker-network
popover Issue 17670 replace typography with text (#19433) 2023-06-26 15:50:08 -07:00
popover-header
tag
tag-url
text Update Design Tokens & Add New Text Variants (#19853) 2023-06-30 11:35:43 -07:00
text-field Swaps UI update (#19169) 2023-06-15 20:17:21 +02:00
text-field-search
component-library-components.scss Adding Box component in TS to component-library (#19363) 2023-06-08 11:12:16 -07:00
COMPONENT-LIBRARY.stories.mdx Updating component-library readme storybook render (#19359) 2023-06-05 21:23:25 +05:30
index.js Adding Box component in TS to component-library (#19363) 2023-06-08 11:12:16 -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