1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 20:39:08 +01:00
metamask-extension/ui/components/component-library/avatar-favicon
2022-11-23 09:58:43 -08:00
..
avatar-favicon.js avatar base component housekeeping (#16583) 2022-11-23 22:12:43 +05:30
avatar-favicon.scss added AvatarFavicon component (#16135) 2022-10-12 16:22:21 -07:00
avatar-favicon.stories.js added AvatarFavicon component (#16135) 2022-10-12 16:22:21 -07:00
avatar-favicon.test.js Icon house keeping updates (#16621) 2022-11-23 09:58:43 -08:00
index.js added AvatarFavicon component (#16135) 2022-10-12 16:22:21 -07:00
README.mdx added AvatarFavicon component (#16135) 2022-10-12 16:22:21 -07:00

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

import { AvatarFavicon } from './avatar-favicon';

# AvatarFavicon

The `AvatarFavicon` is an image component that renders an icon that is provided in the form of a URL.

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

## Props

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

<ArgsTable of={AvatarFavicon} />

### Size

Use the `size` prop to set the size of the `AvatarFavicon`.

Possible sizes include:

- `xs` 16px
- `sm` 24px
- `md` 32px
- `lg` 40px
- `xl` 48px

Defaults to `md`

<Canvas>
  <Story id="ui-components-component-library-avatar-favicon-avatar-favicon-stories-js--size" />
</Canvas>

### Image Source

Use the `imageSource` prop to set the image to be rendered of the `AvatarFavicon`.

### Fallback Icon Props

If there is no `imageSource` then in that case an [icon](/docs/ui-components-component-library-icon-icon-stories-js--default-story) will be used as the fallback display and it can be customised via `fallbackIconProps`.