DocSpace-client/packages/asc-web-components/avatar
2021-09-13 12:54:59 +03:00
..
svg Web: Components: changed component hierarchy 2021-02-24 17:42:09 +03:00
avatar.stories.js Web: Components: added story of Avatar, Box, component refactoring to ensure storybook captures props 2021-03-05 02:52:14 +03:00
avatar.test.js Web: Components: changed component hierarchy 2021-02-24 17:42:09 +03:00
index.js Fix Bug 52282 - Client.Files. When grabbing the left mouse button, page elements go beyond their boundaries 2021-09-13 12:54:59 +03:00
README.md Web: Components/Common: fix imports 2021-02-26 00:19:45 +03:00
styled-avatar.js Web: Components/Common: fix imports 2021-02-26 00:19:45 +03:00

Avatar

Used to display an avatar or brand.

Usage

import Avatar from "@appserver/components/avatar";
<Avatar size="max" role="admin" source="" userName="" editing={false} />

If you want to create an avatar with initials, only first letter of first two words of line is used.

Properties

Props Type Required Values Default Description
size oneOf - max, big, medium, small, min medium Size of avatar
role oneOf - owner, admin, guest, user user Adds a user role table
source string - - - The address of the image for an image avatar
userName string - - - Need to create an avatar with initials
editing bool - - false Displays avatar edit layer
editLabel string - - Edit photo Label for editing layer
editAction func - - - Function called when the avatar change button is pressed
className string - - - Accepts class
id string - - - Accepts id
style obj, array - - - Accepts css style