DocSpace-buildtools/web/ASC.Web.Storybook/stories/avatar/base/README.md

28 lines
1.4 KiB
Markdown
Raw Normal View History

2019-06-18 13:20:49 +00:00
# Avatar
## Usage
```js
import { Avatar } from 'asc-web-components';
```
#### Description
Required to display user avatar on page.
#### Usage
```js
2019-06-27 11:28:13 +00:00
<Avatar size='max' role='admin' source='' userName='' editing={false} />
2019-06-18 13:20:49 +00:00
```
#### Properties
| Props | Type | Required | Values | Default | Description |
| ------------------ | -------- | :------: | ----------------------------------------- | --------- | ----------------------------------------------------- |
2019-06-27 11:28:13 +00:00
| `size` | `oneOf` | - | `max`, `big`, `medium`, `small` | `medium` | Tells what size avatar should be displayed |
2019-06-18 13:20:49 +00:00
| `role` | `oneOf` | - | `owner`, `admin`, `guest`, `user` | ` ` | Adds a user role table |
| `source` | `string` | - | - | ` ` | Avatar image source |
2019-06-28 08:55:17 +00:00
| `userName` | `string` | - | - | ` ` | If you want to create an avatar with initials. Only the first letter of the first two words of the line is used.|
2019-06-27 11:28:13 +00:00
| `editing` | `bool` | - | - | `false` | Displays avatar edit layer |