2022-01-24 08:16:45 +00:00
|
|
|
import { Meta, Story, ArgsTable, Canvas } from "@storybook/addon-docs/blocks";
|
|
|
|
|
|
|
|
import AccessRightSelect from "./";
|
|
|
|
import * as stories from "./access-right-select.stories.js";
|
|
|
|
|
2022-01-27 12:58:56 +00:00
|
|
|
<Meta
|
|
|
|
title="Components/AccessRightSelect"
|
|
|
|
component={AccessRightSelect}
|
|
|
|
argTypes={{
|
|
|
|
onSelect: {
|
|
|
|
action: "onSelect",
|
|
|
|
},
|
|
|
|
options: { required: true },
|
|
|
|
}}
|
|
|
|
/>
|
2022-01-24 08:16:45 +00:00
|
|
|
|
|
|
|
# AccessRightSelect
|
|
|
|
|
|
|
|
Custom access-right-select
|
|
|
|
|
|
|
|
<Canvas>
|
|
|
|
<Story story={stories.Default} name="Default" />
|
|
|
|
</Canvas>
|
|
|
|
|
|
|
|
### Properties
|
|
|
|
|
|
|
|
<ArgsTable story="Default" />
|
|
|
|
|
|
|
|
### Import
|
|
|
|
|
|
|
|
```js
|
|
|
|
import AccessRightSelect from "@appserver/components/access-right-secelt";
|
|
|
|
```
|
|
|
|
|
2022-01-27 12:58:56 +00:00
|
|
|
#### Options is an array of objects that contains the following fields:
|
2022-01-24 08:16:45 +00:00
|
|
|
|
|
|
|
- key
|
|
|
|
- title
|
|
|
|
- description
|
|
|
|
- icon
|
|
|
|
- quota
|
|
|
|
- color
|
|
|
|
|
|
|
|
##### Example:
|
|
|
|
|
|
|
|
```js
|
|
|
|
{
|
|
|
|
key: "key1",
|
2022-01-27 12:58:56 +00:00
|
|
|
title: "Room administrator",
|
|
|
|
description: `Administration of rooms, archiving of rooms, inviting and managing users in rooms.`,
|
|
|
|
icon: CrownIcon,
|
2022-01-24 08:16:45 +00:00
|
|
|
quota: "free",
|
|
|
|
color: "#20D21F",
|
2022-01-27 12:58:56 +00:00
|
|
|
}
|
2022-01-24 08:16:45 +00:00
|
|
|
```
|