Scope picker
v0.64.0, changelogBetaPermission scopes to grant, grouped by resource and bounded by what the viewer holds: a scope outside `allowedScopes` is listed, disabled, with the reason.
API reference
Generated from the types. Every part also takes className.
ScopePicker
- scopesrequired
readonly ScopeOption[]Every scope a grant can hold, in the order to list them.- valuerequired
readonly string[] | nullThe picked scopes;nullis all, including ones added later (only withallowAll).- onValueChangerequired
(value: string[] | null) => void- allowedScopes
readonly string[]The scopes the viewer holds and so may grant; the rest show disabled with the reason. Default: all ofscopes.- allowAll
boolean = falseOffer "all, including ones added later" beside "only these".- legendrequired
ReactNode- hint
ReactNode- error
ReactNode- resourceLabels
Record<string, string>Words for a resource's heading ("devices" → "Devices"). Default: the resource as written.- disabled
boolean- locale
string- labels
Partial<ScopePickerLabels>