DocSpace-client/packages/shared/components/avatar
2024-01-17 15:57:11 +03:00
..
svg Shared: rewrite components to typescript 2023-11-24 19:35:40 +03:00
Avatar.enums.ts Shared:Components:Filter: rewrite to typescript and move from common 2024-01-17 15:57:11 +03:00
avatar.stories.tsx Shared:Components: fix storybook description 2023-11-29 17:38:46 +03:00
Avatar.styled.ts Shared: fix imports 2023-12-06 21:11:14 +03:00
avatar.test.tsx Shared: rewrite components to typescript 2023-11-24 19:35:40 +03:00
Avatar.tsx Client: fix after rewrite to typescript 2023-12-28 11:46:16 +03:00
Avatar.types.ts Client: fix after rewrite to typescript 2023-12-28 11:46:16 +03:00
index.tsx Client: fix after rewrite to typescript 2023-12-28 11:46:16 +03: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