2022-08-01 11:44:33 +02:00
|
|
|
import { Story, Canvas, ArgsTable } from '@storybook/addon-docs';
|
|
|
|
|
|
|
|
import { BaseAvatar } from './base-avatar';
|
|
|
|
|
|
|
|
### This is a base component. It should not be used in your feature code directly but as a "base" for other UI components
|
|
|
|
|
|
|
|
# BaseAvatar
|
|
|
|
|
|
|
|
The `BaseAvatar` is a wrapper component responsible for enforcing dimensions and border radius for Avatar components
|
|
|
|
|
|
|
|
<Canvas>
|
|
|
|
<Story id="ui-components-component-library-base-avatar-base-avatar-stories-js--default-story" />
|
|
|
|
</Canvas>
|
|
|
|
|
|
|
|
## Props
|
|
|
|
|
|
|
|
The `BaseAvatar` accepts all props below as well as all [Box](/ui-components-ui-box-box-stories-js--default-story) component props.
|
|
|
|
|
|
|
|
<ArgsTable of={BaseAvatar} />
|
|
|
|
|
|
|
|
### Size
|
|
|
|
|
|
|
|
Use the `size` prop to set the size of the `BaseAvatar`.
|
|
|
|
|
|
|
|
Possible sizes include:
|
|
|
|
|
|
|
|
- `xs` 16px
|
|
|
|
- `sm` 24px
|
|
|
|
- `md` 32px
|
|
|
|
- `lg` 40px
|
|
|
|
- `xl` 48px
|
|
|
|
|
|
|
|
Defaults to `md`
|
|
|
|
|
|
|
|
<Canvas>
|
|
|
|
<Story id="ui-components-component-library-base-avatar-base-avatar-stories-js--size" />
|
|
|
|
</Canvas>
|
|
|
|
|
|
|
|
### Children
|
|
|
|
|
|
|
|
The `BaseAvatar` component can contain images, icons or text
|
|
|
|
|
|
|
|
<Canvas>
|
|
|
|
<Story id="ui-components-component-library-base-avatar-base-avatar-stories-js--children" />
|
|
|
|
</Canvas>
|
|
|
|
|
2022-08-18 18:30:19 +02:00
|
|
|
### Color, Background Color And Border Color
|
2022-08-01 11:44:33 +02:00
|
|
|
|
2022-08-18 18:30:19 +02:00
|
|
|
Use the `color`, `backgroundColor` and `borderColor` props to set the text color, background-color and border-color of the s of the `BaseAvatar`.
|
2022-08-01 11:44:33 +02:00
|
|
|
|
|
|
|
<Canvas>
|
2022-08-18 18:30:19 +02:00
|
|
|
<Story id="ui-components-component-library-base-avatar-base-avatar-stories-js--color-background-color-and-border-color" />
|
2022-08-01 11:44:33 +02:00
|
|
|
</Canvas>
|