mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-30 08:09:15 +01:00
119a5a4dc4
* added avatar token component * added avatar token component story * added avatar token readme to story * added avatar token readme to story * added halo effect * added test to avatar token component * fixed alt name * added test for blur * added test for aria hidden element * fixed fallback issue * updated halo id in README * added changes to avatar token stories * updated stories and README in storybook * fixed indentation in stories * changed component name structure * updated css for avatar halo image * updated README for Avatar Base Component * added className to avatar Token * Updates to docs and styles * fixed tests for Avatar Token * added color to the props * fixed table props issue * updated avatar token Readme * updated args in avatar token stories Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
54 lines
1.4 KiB
Plaintext
54 lines
1.4 KiB
Plaintext
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>
|
|
|
|
### 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 s of the `BaseAvatar`.
|
|
|
|
<Canvas>
|
|
<Story id="ui-components-component-library-base-avatar-base-avatar-stories-js--color-background-color-and-border-color" />
|
|
</Canvas>
|