Slots
ButtonSlotContent
ButtonSlotContent =
DefineSlotContent<"Button", {icon?:string;label:string;onClick: () =>void; }>
Content for a button slot.
CommandSlotContent
CommandSlotContent =
DefineSlotContent<"Command", {commandId:CommandID;icon?:string; }>
Content for a command slot.
CustomSlotContent
CustomSlotContent =
DefineSlotContent<"Custom", {definition:ComponentDefinition; }>
Content for a custom component slot.
DefineAddToSlotFn()
DefineAddToSlotFn<
TMap> = <K>(slot:K,spec:TMap[K]) =>void
A function type for adding content to slots.
Type Parameters
| Type Parameter |
|---|
TMap extends Record<string, DefineSlotContent<string, Record<string, unknown>>> |
Type Parameters
| Type Parameter |
|---|
K extends string | number | symbol |
Parameters
| Parameter | Type |
|---|---|
slot | K |
spec | TMap[K] |
Returns
void
SlotContent
SlotContent =
ButtonSlotContent|CustomSlotContent|CommandSlotContent
Union type of all possible slot content types.
