import { Story, Canvas, ArgsTable } from '@storybook/addon-docs'; import { AvatarNetwork } from './avatar-network'; # AvatarNetwork The `AvatarNetwork` is a component responsible for display of the image of a given network ## Props The `AvatarNetwork` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props ### Size Use the `size` prop to set the size of the `AvatarNetwork`. Possible sizes include: - `xs` 16px - `sm` 24px - `md` 32px - `lg` 40px - `xl` 48px Defaults to `md` The fallback display of the `AvatarNetwork` is a circle with the initial letter of the network name. The size of the initial letter is calculated based on the size of the `AvatarNetwork` component. ```jsx import { Size } from '../../../helpers/constants/design-system'; import { AvatarNetwork } from '../../component-library'; ``` ### Name Use the `name` prop to set the initial letter of the `AvatarNetwork`. This will be used as the fallback display if no image url is passed to the `src` prop. Use `Text` component props to change the `variant`, `font-weight`, `font-family`, etc. ```jsx import { AvatarNetwork } from '../../component-library'; ; ``` ### Src Use the `src` prop to set the image to be rendered of the `AvatarNetwork`. ```jsx import { AvatarNetwork } from '../../component-library'; ``` ### Show Halo Use the `showHalo` prop to display the component with halo effect. Only works if an image url is supplied to `src` ```jsx import { AvatarNetwork } from '../../component-library'; ; ``` ### Color, Background Color And Border Color Use the `color`, `backgroundColor` and `borderColor` props to set the text color, background-color and border-color of the `AvatarNetwork`. ```jsx import { TextColor, BackgroundColor, BorderColor } from '../../../helpers/constants/design-system'; import { AvatarNetwork } from '../../component-library'; G S ```