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-27 11:28:13 +00:00
|
|
|
| `userName` | `string` | - | - | ` ` | If you want to generate an avatar with initials |
|
|
|
|
| `editing` | `bool` | - | - | `false` | Displays avatar edit layer |
|