mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-02 06:07:06 +01:00
67bfd446fc
* replace base avatar with avatar base component * updated tests * updated description for props * updated docs and background colors * updated snapshot * replaced size with avatar size constant * added tests and fixed indentation * fixed indentation in readme |
||
---|---|---|
.. | ||
avatar-favicon.js | ||
avatar-favicon.scss | ||
avatar-favicon.stories.js | ||
avatar-favicon.test.js | ||
index.js | ||
README.mdx |
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`.