@sqlrooms/blocks / StatefulBlockDefinition
Type Alias: StatefulBlockDefinition<TRoomState>
StatefulBlockDefinition<
TRoomState> =object
Type Parameters
| Type Parameter | Default type |
|---|---|
TRoomState | unknown |
Properties
type
type:
BlockType
label
label:
string
defaultTitle?
optionaldefaultTitle?:string
icon?
optionalicon?:ComponentType<{className?:string; }>
capabilities?
optionalcapabilities?:BlockCapabilities
createInstance?
optionalcreateInstance?: (context) =>BlockInstance
Parameters
| Parameter | Type |
|---|---|
context | StatefulBlockContext<TRoomState> |
Returns
ensureState?
optionalensureState?: (context) =>void
Parameters
| Parameter | Type |
|---|---|
context | StatefulBlockContext<TRoomState> |
Returns
void
deleteState?
optionaldeleteState?: (context) =>void
Parameters
| Parameter | Type |
|---|---|
context | StatefulBlockContext<TRoomState> |
Returns
void
rename?
optionalrename?: (context) =>void
Parameters
| Parameter | Type |
|---|---|
context | StatefulBlockRenameContext<TRoomState> |
Returns
void
close?
optionalclose?: (context) =>void
Parameters
| Parameter | Type |
|---|---|
context | StatefulBlockContext<TRoomState> |
Returns
void
render
render:
ComponentType<StatefulBlockRenderProps<TRoomState>>
