DocSpace-client/packages/shared/components/avatar
2024-04-17 10:55:33 +02:00
..
svg Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
Avatar.enums.ts Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
avatar.stories.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
Avatar.styled.ts Client: Login: DocEditor Remove increasing value for RTL 2024-04-17 10:55:33 +02:00
avatar.test.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
Avatar.tsx Web: Shared: fixed semitransparent tooltip 2024-04-03 17:09:37 +05:00
Avatar.types.ts Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
index.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
README.md Client: fix wrong import - export for shared components 2024-01-10 11:01:43 +03:00

Avatar

Used to display an avatar or brand.

Usage

import { Avatar } from "@docspace/shared/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
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