2022-10-13 01:22:21 +02:00
import { Story, Canvas, ArgsTable } from '@storybook/addon-docs';
2023-01-11 17:11:06 +01:00
import { AvatarBase } from '../';
2022-10-13 01:22:21 +02:00
import { AvatarFavicon } from './avatar-favicon';
# AvatarFavicon
2023-08-15 23:35:18 +02:00
The `AvatarFavicon` is an image component that represents a dapp or third party service
2022-10-13 01:22:21 +02:00
<Canvas>
2023-01-20 20:27:46 +01:00
<Story id="components-componentlibrary-avatarfavicon--default-story" />
2022-10-13 01:22:21 +02:00
</Canvas>
## Props
<ArgsTable of={AvatarFavicon} />
### Size
2023-08-15 23:35:18 +02:00
Use the `size` prop and the `AvatarFaviconSize` enum from `../../component-library` to change the size of `AvatarFavicon`
2023-01-11 17:11:06 +01:00
2022-10-13 01:22:21 +02:00
Possible sizes include:
2023-08-15 23:35:18 +02:00
- `AvatarFaviconSize.Xs` 16px
- `AvatarFaviconSize.Sm` 24px
- `AvatarFaviconSize.Md` 32px
- `AvatarFaviconSize.Lg` 40px
- `AvatarFaviconSize.Xl` 48px
2022-10-13 01:22:21 +02:00
2023-08-15 23:35:18 +02:00
Defaults to `AvatarFaviconSize.MD`
2022-10-13 01:22:21 +02:00
<Canvas>
2023-02-14 18:33:04 +01:00
<Story id="components-componentlibrary-avatarfavicon--size-story" />
2022-10-13 01:22:21 +02:00
</Canvas>
2023-01-11 17:11:06 +01:00
```jsx
2023-08-15 23:35:18 +02:00
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} />
2023-01-11 17:11:06 +01:00
```
### Src
Use the `src` prop to set the image to be rendered of the `AvatarFavicon`.
<Canvas>
2023-01-20 20:27:46 +01:00
<Story id="components-componentlibrary-avatarfavicon--src" />
2023-01-11 17:11:06 +01:00
</Canvas>
```jsx
2023-08-15 23:35:18 +02:00
import { AvatarFavicon } from '../../component-library';
2022-10-13 01:22:21 +02:00
2023-01-11 17:11:06 +01:00
<AvatarFavicon src="https://uniswap.org/favicon.ico" />
<AvatarFavicon src="https://1inch.exchange/assets/favicon/favicon-32x32.png" />
```
2022-10-13 01:22:21 +02:00
### Fallback Icon Props
2023-01-20 20:27:46 +01:00
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`.