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
David Walsh 10dc686505
Dark Mode Part 1: Switch to Using CSS Variables (#13147)
3 years ago
..
README.mdx Updating IconWithFallback to functional component, adding stories and docs (#12797) 3 years ago
icon-with-fallback.component.js Updating IconWithFallback to functional component, adding stories and docs (#12797) 3 years ago
icon-with-fallback.scss Dark Mode Part 1: Switch to Using CSS Variables (#13147) 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>

## Component API

<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>