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-with-fallback
Nidhi Kumari 7424e98416
Updated all instances of "Component API" to "Props" in storybook documentation (#15324)
2 years ago
..
README.mdx Updated all instances of "Component API" to "Props" in storybook documentation (#15324) 2 years ago
icon-with-fallback.component.js Fix for connected sites throwing error if name is null. (#13974) 3 years ago
icon-with-fallback.scss Update design tokens library from 1.5 to 1.6 WIP (#14732) 3 years ago
icon-with-fallback.stories.js Updating IconWithFallback to functional component, adding stories and docs (#12797) 3 years ago
icon-with-fallback.test.js Updating IconWithFallback to functional component, adding stories and docs (#12797) 3 years ago
index.js remove the ui/app and ui/lib folders (#10911) 4 years ago

README.mdx

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

import IconWithFallback from '.';

# IconWithFallback

Icon component that takes an image src and uses `onError` to fallback to the first letter of the icon `name`

<Canvas>
<Story id="ui-components-ui-icon-with-fallback-icon-with-fallback-stories-js--default-story" />
</Canvas>

## Props

<ArgsTable of={IconWithFallback} />

## Usage

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

### Fallback

If the image src errors `onError` the image tag will be replace with a span and the first letter of the `name` prop

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