DocSpace-client/packages/asc-web-common/components/ProfileMenu
2021-02-26 00:19:45 +03:00
..
index.js Web: Common: fix after merge, fix imports and hierarchy 2021-02-25 17:20:11 +03:00
ProfileMenu.js Web: Common: fix after merge, fix imports and hierarchy 2021-02-25 17:20:11 +03:00
ProfileMenu.stories.js Web: Components/Common: fix imports 2021-02-26 00:19:45 +03:00
ProfileMenu.test.js Web: Common: fix after merge, fix imports and hierarchy 2021-02-25 17:20:11 +03:00
README.md Web: Components/Common: fix imports 2021-02-26 00:19:45 +03:00
StyledProfileMenu.js Web: Common: fix after merge, fix imports and hierarchy 2021-02-25 17:20:11 +03:00

ProfileMenu

Usage

import ProfileMenu from "@appserver/common/components/ProfileMenu";
<ProfileMenu
  avatarRole="admin"
  avatarSource=""
  displayName="Jane Doe"
  email="janedoe@gmail.com"
/>

To add preview of user profile, you must use ProfileMenu component inherited from DropDownItem.

To add an avatar username and email, you need to add parameters of Avatar component: avatarSource - link to user's avatar, avatarRole - user's role, displayName - user name and email - users email address.

Properties

Props Type Required Values Default Description
avatarRole oneOf - owner,admin,guest,user user Adds a user role table
avatarSource string - - - Avatar image source
className string - - - Accepts class
displayName string - - - User name for display
email string - - - User email for display
id string - - - Accepts id
style obj, array - - - Accepts css style