2022-10-12 20:19:12 +02:00
|
|
|
import { Story, Canvas, ArgsTable } from '@storybook/addon-docs';
|
|
|
|
|
|
|
|
import { AvatarWithBadge } from './avatar-with-badge';
|
|
|
|
|
|
|
|
# AvatarWithBadge
|
|
|
|
|
|
|
|
The `AvatarWithBadge` is a wrapper component that adds badge display options to avatars.
|
|
|
|
|
|
|
|
<Canvas>
|
|
|
|
<Story id="ui-components-component-library-avatar-with-badge-avatar-with-badge-stories-js--default-story" />
|
|
|
|
</Canvas>
|
|
|
|
|
|
|
|
## Props
|
|
|
|
|
|
|
|
The `AvatarWithBadge` accepts all props below
|
|
|
|
|
|
|
|
<ArgsTable of={AvatarWithBadge} />
|
|
|
|
|
|
|
|
### Badge Position
|
|
|
|
|
|
|
|
Use the `badgePosition` prop to set the position of the badge, it can have two values `Top` and `Bottom`
|
|
|
|
|
|
|
|
<Canvas>
|
2022-12-15 18:28:42 +01:00
|
|
|
<Story id="ui-components-component-library-avatar-with-badge-avatar-with-badge-stories-js--badge-position" />
|
2022-10-12 20:19:12 +02:00
|
|
|
</Canvas>
|
|
|
|
|
|
|
|
### Badge
|
|
|
|
|
|
|
|
Used to define the badge component to be rendered inside the `AvatarWithBadge`
|
|
|
|
|
|
|
|
### Badge Props
|
|
|
|
|
|
|
|
The required props to be passed to the badge.
|
|
|
|
|
|
|
|
### Children
|
|
|
|
|
|
|
|
The children to be rendered inside the AvatarWithBadge. Generally used with the `AvatarAccount`
|