Skip to content

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.

TypeScript
function Restricted(props: RestrictedProps): Element
Parameters
NameTypeDescription
propsRestrictedProps

RestrictedProps.

Element
Restricted props
NameTypeDescription
childrenReactNode

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).

reasonstring

Why, short: the tooltip and the group's accessible name ("Admin only").

restrictedboolean

Whether this connection may not change what it wraps.

style?CSSProperties

Inline styles on the root while restricted.

ui/src/components/Restricted.tsx:37

Interfaces#

RestrictedPropsInterface#

Props for Restricted.

TypeScript
interface RestrictedProps
RestrictedProps properties
NameTypeDescription
childrenReactNode

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).

reasonstring

Why, short: the tooltip and the group's accessible name ("Admin only").

restrictedboolean

Whether this connection may not change what it wraps.

style?CSSProperties

Inline styles on the root while restricted.

ui/src/components/Restricted.tsx:17