API reference
blocks/permission-grid
Import
Section titled “Import”import * as api from "@fungi.computer/caps/blocks/permission-grid";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | PermissionState | Whether the capability is available in this scope. |
| type alias | PermissionGridRow | One capability row. |
| type alias | PermissionGridProps | Props accepted by PermissionGrid. |
| function | PermissionGrid() | Product-neutral, dense capability sheet: one row per capability. |
PermissionStatetype alias
Section titled “PermissionState”type PermissionState = "allowed" | "denied";Whether the capability is available in this scope.
PermissionGridRowtype alias
Section titled “PermissionGridRow”type PermissionGridRow = Readonly<{ id: string; mark: ReactNode; label: string; group?: string; state: PermissionState; stateLabel: string; scope: string; control?: ReactNode;}>;One capability row.
PermissionGridPropstype alias
Section titled “PermissionGridProps”type PermissionGridProps = Readonly<{ caption: ReactNode; summary?: ReactNode; rows: readonly PermissionGridRow[]; headings?: Readonly<{ capability: string; state: string; scope: string; control?: string; }>; className?: string;}>;Props accepted by PermissionGrid.
PermissionGrid()function
Section titled “PermissionGrid()”function PermissionGrid(__namedParameters): Element;Product-neutral, dense capability sheet: one row per capability.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
PermissionGridProps |
Returns
Section titled “Returns”Element