DocSpace-client/packages/shared/components/avatar
2023-11-29 17:38:46 +03:00
..
svg Shared: rewrite components to typescript 2023-11-24 19:35:40 +03:00
Avatar.enums.ts Shared: rewrite components to typescript 2023-11-24 19:35:40 +03:00
avatar.stories.tsx Shared:Components: fix storybook description 2023-11-29 17:38:46 +03:00
Avatar.styled.ts Shared: rewrite components to typescript 2023-11-24 19:35:40 +03:00
avatar.test.tsx Shared: rewrite components to typescript 2023-11-24 19:35:40 +03:00
Avatar.types.ts Shared: rewrite components to typescript 2023-11-24 19:35:40 +03:00
index.tsx Shared:Components: fix storybook description 2023-11-29 17:38:46 +03:00
README.md Shared: rewrite components to typescript 2023-11-24 19:35:40 +03:00

Avatar

Used to display an avatar or brand.

Usage

import Avatar from "@docspace/shared/components";
<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
isIcon bool - - false Set true if .svg is provided as source prop
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