DocSpace-client/packages/components/access-right-select
2022-09-19 12:45:49 +03:00
..
svg Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00
access-right-select.stories.js Web: Components: AccessRightSelect: Reworked component 2022-09-12 18:51:54 +03:00
access-right-select.stories.mdx Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00
data.js Web: Components: AccessRightSelect: Reworked component 2022-09-12 18:51:54 +03:00
index.js Web: Components: AccessRightSelect: Fixed styles 2022-09-19 12:45:49 +03:00
README.md Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00
styled-accessright.js Web: Components: AccessRightSelect: Fixed styles 2022-09-19 12:45:49 +03:00

AccessRightSelect

Usage

import AccessRightSelect from "@docspace/components/AccessRightSelect";
<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: CrownIcon,
    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: CrownIcon,
    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