2022-11-10 01:31:51 +01:00
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>
2023-01-20 20:27:46 +01:00
<Story id="components-componentlibrary-pickernetwork--default-story" />
2022-11-10 01:31:51 +01:00
</Canvas>
## Props
2023-01-20 20:27:46 +01:00
The `PickerNetwork` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props.
2022-11-10 01:31:51 +01:00
<ArgsTable of={PickerNetwork} />
2023-01-06 00:30:42 +01:00
### Label
2022-11-10 01:31:51 +01:00
2023-01-06 00:30:42 +01:00
Use the `label` prop for the text content of the `PickerNetwork` component
2022-11-10 01:31:51 +01:00
<Canvas>
2023-01-20 20:27:46 +01:00
<Story id="components-componentlibrary-pickernetwork--label" />
2022-11-10 01:31:51 +01:00
</Canvas>
```jsx
2023-01-06 00:30:42 +01:00
import { PickerNetwork } from '../../ui/component-library';
<PickerNetwork label="Arbitrum One" />
<PickerNetwork label="Polygon Mainnet" />
<PickerNetwork label="Optimism" />
2022-11-10 01:31:51 +01:00
```
2023-01-06 00:30:42 +01:00
### Src
2022-11-10 01:31:51 +01:00
2023-01-06 00:30:42 +01:00
Use the `src` prop with an image url to render the `AvatarNetwork`. Use the `avatarNetworkProps` to pass additional props to the `AvatarNetwork` component.
2022-11-10 01:31:51 +01:00
<Canvas>
2023-01-20 20:27:46 +01:00
<Story id="components-componentlibrary-pickernetwork--src" />
2022-11-10 01:31:51 +01:00
</Canvas>
```jsx
2023-01-06 00:30:42 +01:00
import { PickerNetwork } from '../../ui/component-library';
<PickerNetwork src="./images/arbitrum.svg" />
<PickerNetwork src="./images/matic-token.png" />
<PickerNetwork src="./images/optimism.svg" />
2022-11-10 01:31:51 +01:00
```