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

import { AvatarBase } from '../';

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

# AvatarFavicon

The `AvatarFavicon` is an image component that represents a dapp or third party service

<Canvas>
  <Story id="components-componentlibrary-avatarfavicon--default-story" />
</Canvas>

## Props

<ArgsTable of={AvatarFavicon} />

### Size

Use the `size` prop and the `AvatarFaviconSize` enum from `../../component-library` to change the size of `AvatarFavicon`

Possible sizes include:

- `AvatarFaviconSize.Xs` 16px
- `AvatarFaviconSize.Sm` 24px
- `AvatarFaviconSize.Md` 32px
- `AvatarFaviconSize.Lg` 40px
- `AvatarFaviconSize.Xl` 48px

Defaults to `AvatarFaviconSize.MD`

<Canvas>
  <Story id="components-componentlibrary-avatarfavicon--size-story" />
</Canvas>

```jsx
import { AvatarFavicon, AvatarFaviconSize } from '../../component-library';

<AvatarFavicon size={AvatarFaviconSize.Xs} />
<AvatarFavicon size={AvatarFaviconSize.Sm} />
<AvatarFavicon size={AvatarFaviconSize.Md} />
<AvatarFavicon size={AvatarFaviconSize.Lg} />
<AvatarFavicon size={AvatarFaviconSize.Xl} />
```

### Src

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

<Canvas>
  <Story id="components-componentlibrary-avatarfavicon--src" />
</Canvas>

```jsx
import { AvatarFavicon } from '../../component-library';

<AvatarFavicon src="https://uniswap.org/favicon.ico" />
<AvatarFavicon src="https://1inch.exchange/assets/favicon/favicon-32x32.png" />
```

### Fallback Icon Props

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