1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui/components/component-library/avatar-account
Nidhi Kumari 67bfd446fc
avatar base component housekeeping (#16583)
* replace base avatar with avatar base component

* updated tests

* updated description for props

* updated docs and background colors

* updated snapshot

* replaced size with avatar size constant

* added tests and fixed indentation

* fixed indentation in readme
2022-11-23 22:12:43 +05:30
..
avatar-account.constants.js added AvatarAccount component (#15795) 2022-10-07 21:23:40 +05:30
avatar-account.js avatar base component housekeeping (#16583) 2022-11-23 22:12:43 +05:30
avatar-account.scss added AvatarAccount component (#15795) 2022-10-07 21:23:40 +05:30
avatar-account.stories.js added AvatarAccount component (#15795) 2022-10-07 21:23:40 +05:30
avatar-account.test.js added AvatarAccount component (#15795) 2022-10-07 21:23:40 +05:30
index.js added AvatarAccount component (#15795) 2022-10-07 21:23:40 +05:30
README.mdx added AvatarAccount component (#15795) 2022-10-07 21:23:40 +05:30

import { Story, Canvas, ArgsTable } from '@storybook/addon-docs';

import { AvatarAccount } from './avatar-account';

# AvatarAccount

The `AvatarAccount` is a type of avatar reserved for representing accounts.

<Canvas>
  <Story id="ui-components-component-library-avatar-account-avatar-account-stories-js--default-story" />
</Canvas>

## Props

The `AvatarAccount` accepts all props below 

<ArgsTable of={AvatarAccount} />

### Size

Use the `size` prop to set the size of the `AvatarAccount`.

Possible sizes include:

- `xs` 16px
- `sm` 24px
- `md` 32px
- `lg` 40px
- `xl` 48px

Defaults to `md`

<Canvas>
  <Story id="ui-components-component-library-avatar-account-avatar-account-stories-js--size" />
</Canvas>

### type

Use the `type` prop for the avatar to be rendered, it can either be a Jazzicon or a Blockie

<Canvas>
  <Story id="ui-components-component-library-avatar-account-avatar-account-stories-js--type" />
</Canvas>