components/Restricted
import { … } from 'zidane-ui'ui/src/components/Restricted.tsx
Components#
RestrictedComponent#
Renders children dimmed and inert, with reason as a tooltip, while restricted; else as they are.
function Restricted(props: RestrictedProps): ElementParameters
| Name | Type | Description |
|---|---|---|
| props | RestrictedProps |
Returns
ElementProps
| Name | Type | Description |
|---|---|---|
| children | ReactNode | What it wraps. |
| className? | string | Classes merged on the root while restricted. |
| inline? | boolean | Wrap inline content (a button in a row) instead of a block (a section). |
| reason | string | Why, short: the tooltip and the group's accessible name ("Admin only"). |
| restricted | boolean | Whether this connection may not change what it wraps. |
| style? | CSSProperties | Inline styles on the root while restricted. |
Interfaces#
RestrictedPropsInterface#
Props for Restricted.
interface RestrictedPropsProperties
| Name | Type | Description |
|---|---|---|
| children | ReactNode | What it wraps. |
| className? | string | Classes merged on the root while restricted. |
| inline? | boolean | Wrap inline content (a button in a row) instead of a block (a section). |
| reason | string | Why, short: the tooltip and the group's accessible name ("Admin only"). |
| restricted | boolean | Whether this connection may not change what it wraps. |
| style? | CSSProperties | Inline styles on the root while restricted. |