1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-29 15:50:28 +01:00
metamask-extension/ui/components/component-library/avatar-with-badge
2022-11-15 14:22:08 -03:30
..
avatar-with-badge.constants.js Revert "Revert "Merge pull request #16353 from MetaMask/Version-v10.22.0"" 2022-11-15 14:22:08 -03:30
avatar-with-badge.js Revert "Revert "Merge pull request #16353 from MetaMask/Version-v10.22.0"" 2022-11-15 14:22:08 -03:30
avatar-with-badge.scss Revert "Revert "Merge pull request #16353 from MetaMask/Version-v10.22.0"" 2022-11-15 14:22:08 -03:30
avatar-with-badge.stories.js Revert "Revert "Merge pull request #16353 from MetaMask/Version-v10.22.0"" 2022-11-15 14:22:08 -03:30
avatar-with-badge.test.js Revert "Revert "Merge pull request #16353 from MetaMask/Version-v10.22.0"" 2022-11-15 14:22:08 -03:30
index.js Revert "Revert "Merge pull request #16353 from MetaMask/Version-v10.22.0"" 2022-11-15 14:22:08 -03:30
README.mdx Revert "Revert "Merge pull request #16353 from MetaMask/Version-v10.22.0"" 2022-11-15 14:22:08 -03:30

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>
  <Story id="ui-components-component-library-avatar-with-badge-avatar-with-badge-stories-js--badge-positions" />
</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`