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/component-library/picker-network
Nidhi Kumari ce9af8aac3
Added Picker Network Component (#16340)
2 years ago
..
__snapshots__ Added Picker Network Component (#16340) 2 years ago
README.mdx Added Picker Network Component (#16340) 2 years ago
index.js Added Picker Network Component (#16340) 2 years ago
picker-network.js Added Picker Network Component (#16340) 2 years ago
picker-network.scss Added Picker Network Component (#16340) 2 years ago
picker-network.stories.js Added Picker Network Component (#16340) 2 years ago
picker-network.test.js Added Picker Network Component (#16340) 2 years ago

README.mdx

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

import { PickerNetwork } from './picker-network';

# PickerNetwork

The `PickerNetwork` is used for the action of changing a network.

<Canvas>
<Story id="ui-components-component-library-picker-network-picker-network-stories-js--default-story" />
</Canvas>

## Props

The `PickerNetwork` accepts all props below as well as all [Box](/docs/ui-components-ui-box-box-stories-js--default-story#props) component props.

<ArgsTable of={PickerNetwork} />

### Src

Use the `src` prop with an image url to render the `AvatarNetwork`.

<Canvas>
<Story id="ui-components-component-library-picker-network-picker-network-stories-js--src" />
</Canvas>

```jsx
import { PickerNetwork } from '../../ui/component-library/picker-network';
<PickerNetwork src="./images/arbitrum.svg" />
<PickerNetwork src="./images/matic-token.png" />
<PickerNetwork src="./images/optimism.svg" />
```

### Label

Use the `label` prop for the text content of the `PickerNetwork` component

<Canvas>
<Story id="ui-components-component-library-picker-network-picker-network-stories-js--label" />
</Canvas>

```jsx
import { PickerNetwork } from '../../ui/component-library/picker-network';
<PickerNetwork label="Arbitrum One" />
<PickerNetwork label="Polygon Mainnet" />
<PickerNetwork label="Optimism" />
```