Skip to content
API reference

blocks/permission-grid

Import
import * as api from "@fungi.computer/caps/blocks/permission-grid";
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”
Signature
type PermissionState = "allowed" | "denied";

Whether the capability is available in this scope.


PermissionGridRowtype alias

Section titled “PermissionGridRow”
Signature
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”
Signature
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()”
Signature
function PermissionGrid(__namedParameters): Element;

Product-neutral, dense capability sheet: one row per capability.

Parameter Type
__namedParameters PermissionGridProps

Element