A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
ciphermask/ui/components/ui/icon
Matthew Epps dcfe80c255
Add entry point for metalabs dapp into metamask home page (#15407)
2 years ago
..
preloader remove the ui/app and ui/lib folders (#10911) 4 years ago
README.mdx Created a new token component (#15617) 2 years ago
approve-icon.component.js Fix icon component for new Storybook format (#12887) 3 years ago
copy-icon.component.js Fix icon component for new Storybook format (#12887) 3 years ago
icon-block-explorer.js Created a new token component (#15617) 2 years ago
icon-caret-down.js Updating all caret icons for dark mode 🥕 (#13861) 3 years ago
icon-caret-left.js Fix Settings Header Back Button and update "Add Contacts" position (#14103) 3 years ago
icon-caret-right.js Updating all caret icons for dark mode 🥕 (#13861) 3 years ago
icon-caret-up.js Updating all caret icons for dark mode 🥕 (#13861) 3 years ago
icon-chart.js Add entry point for metalabs dapp into metamask home page (#15407) 2 years ago
icon-check.js Updating account and network icons (#13947) 3 years ago
icon-cog.js Updating account and network icons (#13947) 3 years ago
icon-connect.js Updating account and network icons (#13947) 3 years ago
icon-copy.js Created a new contract details modal (#15549) 2 years ago
icon-eye-slash.js Add `IconEye` and `IconEyeSlash` icon components (#13978) 3 years ago
icon-eye.js Add `IconEye` and `IconEyeSlash` icon components (#13978) 3 years ago
icon-import.js Updating account and network icons (#13947) 3 years ago
icon-plus.js Updating account and network icons (#13947) 3 years ago
icon-speech-bubbles.js Updating account and network icons (#13947) 3 years ago
icon-token-search.js Dark mdoe: token search icon (#14213) 3 years ago
icon.stories.js Created a new token component (#15617) 2 years ago
index.scss Updating all caret icons for dark mode 🥕 (#13861) 3 years ago
info-icon-inverted.component.js Fix icon component for new Storybook format (#12887) 3 years ago
info-icon.component.js Fix icon component for new Storybook format (#12887) 3 years ago
interaction-icon.component.js Fix icon component for new Storybook format (#12887) 3 years ago
overview-buy-icon.component.js Fix icon component for new Storybook format (#12887) 3 years ago
overview-send-icon.component.js Fix icon component for new Storybook format (#12887) 3 years ago
receive-icon.component.js Fix icon component for new Storybook format (#12887) 3 years ago
search-icon.js Move search icon and add to storybook (#14940) 2 years ago
send-icon.component.js Fix icon component for new Storybook format (#12887) 3 years ago
sign-icon.component.js Fix icon component for new Storybook format (#12887) 3 years ago
sun-check-icon.component.js Dark Mode: Swap hex colors in ui/components/ui folder (#14191) 3 years ago
swap-icon-for-list.component.js Fix icon component for new Storybook format (#12887) 3 years ago
swap-icon.component.js Fix icon component for new Storybook format (#12887) 3 years ago

README.mdx

import { Story, Canvas, ArgsTable } from '@storybook/addon-docs';

import IconCaretLeft from './icon-caret-left.js';
import Approve from './approve-icon.component';
import BuyIcon from './overview-buy-icon.component';
import CopyIcon from './copy-icon.component';
import InfoIcon from './info-icon.component';
import InfoIconInverted from './info-icon-inverted.component';
import Interaction from './interaction-icon.component';
import Preloader from './preloader';
import ReceiveIcon from './receive-icon.component';
import SendIcon from './send-icon.component';
import Sign from './sign-icon.component';
import SunCheck from './sun-check-icon.component';
import Swap from './swap-icon-for-list.component';
import SwapIcon from './overview-send-icon.component';
import SwapIconComponent from './swap-icon.component';
import IconCopy from './icon-copy'
import IconBlockExplorer from './icon-block-explorer';


# Icon

A range of SVG icon components

> 💡 A lot of the our icons have different props and are not consistent we will need to work on fixing this.

## Props

<ArgsTable of={IconCaretLeft} />

## Usage

The following describes the props and example usage for this component.

### Size

Use the `size` prop to change the size of the icon it should adhere to an `8px` grid e.g. `16px`, `24px`, `32px`

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--size" />
</Canvas>

### Color

Use the `color` prop to change the color of the icon. `color` accepts any css value. Should use the valid design token css variables

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--color" />
</Canvas>

### AriaLabel

Use the `ariaLabel` prop with icons intended to be used without text. e.g. back buttons or icons that should provide extra information to screen readers

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--aria-label" />
</Canvas>

Will render the html

```html
<svg
width="24"
height="24"
fill="currentColor"
aria-label="back"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"
>
<path
d="m335 113c8 8 8 22 0 30l-113 113 113 113c8 8 8 22 0 30-8 8-22 8-30 0l-128-128c-8-8-8-22 0-30l128-128c8-8 22-8 30 0z"
></path>
</svg>
```

### ClassName

Use the `className` prop to add an additional class to the icon. This additional class is recommend to be used with layout of positioning css

# DEPRECATED ICONS

> The icons below use many different prop combinations and should be updated to the above api

## Approve

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--approve-story" />
</Canvas>

<ArgsTable of={Approve} />

## Sign

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--sign-story" />
</Canvas>

<ArgsTable of={Sign} />

## Swap

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--swap-story" />
</Canvas>

<ArgsTable of={Swap} />

## SendIcon

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--send-icon-story" />
</Canvas>

<ArgsTable of={SendIcon} />

## ReceiveIcon

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--receive-icon-story" />
</Canvas>

<ArgsTable of={ReceiveIcon} />

## Interaction

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--interaction-story" />
</Canvas>

<ArgsTable of={Interaction} />

## InfoIcon

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--info-icon-story" />
</Canvas>

<ArgsTable of={InfoIcon} />

## InfoIconInverted

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--info-icon-inverted-story" />
</Canvas>

<ArgsTable of={InfoIconInverted} />

## SunCheck

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--sun-check-story" />
</Canvas>

<ArgsTable of={SunCheck} />

## BuyIcon

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--buy-icon-story" />
</Canvas>

<ArgsTable of={BuyIcon} />

## SwapIcon

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--swap-icon-story" />
</Canvas>

<ArgsTable of={SwapIcon} />

## Send/SwapIcon

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--send-swap-icon-story" />
</Canvas>

<ArgsTable of={SwapIconComponent} />

## CopyIcon

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--copy-icon-story" />
</Canvas>

<ArgsTable of={CopyIcon} />

## Preloader

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--preloader-story" />
</Canvas>

<ArgsTable of={Preloader} />

## IconCopy

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--icon-copy-story" />
</Canvas>

<ArgsTable of={IconCopy} />

## IconBlockExplorer

<Canvas>
<Story id="ui-components-ui-icon-icon-stories-js--icon-block-explorer-story" />
</Canvas>

<ArgsTable of={IconBlockExplorer} />