UNPKG

@koordinates/xstate-tree

Version:

Build UIs with Actors using xstate and React

34 lines (33 loc) 803 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.multiSlot = exports.singleSlot = exports.SlotType = void 0; /** * @public */ var SlotType; (function (SlotType) { SlotType[SlotType["SingleSlot"] = 0] = "SingleSlot"; SlotType[SlotType["MultiSlot"] = 1] = "MultiSlot"; })(SlotType = exports.SlotType || (exports.SlotType = {})); /** * @public */ function singleSlot(name) { return { type: SlotType.SingleSlot, name, getId: () => `${name.toLowerCase()}-slot`, }; } exports.singleSlot = singleSlot; /** * @public */ function multiSlot(name) { return { type: SlotType.MultiSlot, name: `${name}Multi`, getId: (id) => `${id}-${name.toLowerCase()}multi-slots`, }; } exports.multiSlot = multiSlot;