Skip to content

@sqlrooms/blocks / StatefulBlockDefinition

Type Alias: StatefulBlockDefinition<TRoomState> ​

StatefulBlockDefinition<TRoomState> = object

Type Parameters ​

Type ParameterDefault type
TRoomStateunknown

Properties ​

type ​

type: BlockType


label ​

label: string


defaultTitle? ​

optional defaultTitle?: string


icon? ​

optional icon?: ComponentType<{ className?: string; }>


capabilities? ​

optional capabilities?: BlockCapabilities


createInstance? ​

optional createInstance?: (context) => BlockInstance

Parameters ​

ParameterType
contextStatefulBlockContext<TRoomState>

Returns ​

BlockInstance


ensureState? ​

optional ensureState?: (context) => void

Parameters ​

ParameterType
contextStatefulBlockContext<TRoomState>

Returns ​

void


deleteState? ​

optional deleteState?: (context) => void

Parameters ​

ParameterType
contextStatefulBlockContext<TRoomState>

Returns ​

void


rename? ​

optional rename?: (context) => void

Parameters ​

ParameterType
contextStatefulBlockRenameContext<TRoomState>

Returns ​

void


close? ​

optional close?: (context) => void

Parameters ​

ParameterType
contextStatefulBlockContext<TRoomState>

Returns ​

void


render ​

render: ComponentType<StatefulBlockRenderProps<TRoomState>>


settings? ​

optional settings?: ComponentType<StatefulBlockSettingsProps<TRoomState>>