DocSpace-client/packages/shared/components/access-right-select
2024-02-19 14:59:13 +03:00
..
AccessRightSelect.mdx Client: fix after rewrite to typescript 2023-12-27 17:45:22 +03:00
AccessRightSelect.stories.tsx Shared:Components:AccessRightSelect: rewrite to typescipr 2023-12-22 14:46:29 +03:00
AccessRightSelect.styled.ts fixed gap between InvitePanel RoleSelector and group max role warning 2024-02-19 14:59:13 +03:00
AccessRightSelect.tsx Web: Components: fixed AccessRightSelect 2024-02-07 14:39:35 +03:00
AccessRightSelect.types.ts Shared:Components:AccessRightSelect: rewrite to typescipr 2023-12-22 14:46:29 +03:00
data.ts Shared:Components:AccessRightSelect: rewrite to typescipr 2023-12-22 14:46:29 +03:00
index.tsx Shared:Components:AccessRightSelect: rewrite to typescipr 2023-12-22 14:46:29 +03:00
README.md Shared:Components:AccessRightSelect: rewrite to typescipr 2023-12-22 14:46:29 +03:00

AccessRightSelect

Usage

import { AccessRightSelect } from "@docspace/shared/components";
<AccessRightSelect
  options={options}
  onSelect={(option) => console.log("selected", option)}
  selectedOption={{
    key: "key1",
    title: "Room administrator",
    description: `Administration of rooms, archiving of rooms, inviting and managing users in rooms.`,
    icon: AccessCommentReactSvgUrl,
    quota: "free",
    color: "#20D21F",
  }}
/>

Options is an array of objects that contains the following fields:

  • key
  • title
  • description
  • icon
  • quota
  • color
Example:
  {
    key: "key1",
    title: "Room administrator",
    description: `Administration of rooms, archiving of rooms, inviting and managing users in rooms.`,
    icon: AccessCommentReactSvgUrl,
    quota: "free",
    color: "#20D21F",
  }

Properties

Props Type Required Values Default Description
options obj, array - - List of options
onSelect obj, array - - - Will be triggered whenever an AccessRightSelect is selected option
selectedOption obj - - - The option that is selected by default