DocSpace-client/packages/asc-web-components/access-right-select
2022-04-14 12:02:20 +03:00
..
svg access-right-select, upd link-with-dropdown 2022-01-24 11:16:45 +03:00
access-right-select.stories.js change props, upd story 2022-01-27 15:58:56 +03:00
access-right-select.stories.mdx change props, upd story 2022-01-27 15:58:56 +03:00
data.js change props, upd story 2022-01-27 15:58:56 +03:00
index.js Web:Components:AccessRightSelect: add support advancedOptions, fix onSelect function, add support dark-theme 2022-04-14 12:02:20 +03:00
README.md update README.md 2022-01-27 17:29:39 +03:00
styled-accessright.js Web:Components:AccessRightSelect: add support advancedOptions, fix onSelect function, add support dark-theme 2022-04-14 12:02:20 +03:00

AccessRightSelect

Usage

import AccessRightSelect from "@appserver/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