Documentation
IeLayoutSlots
IE layout slots: batch-renders item slots from a slot descriptor list.
import { IE_MACHINES, ieExpandSlots } from "../ie-machine-layout";
import { IeLayoutSlots } from "./index";
export function IeLayoutSlotsDemo() {
const slots = ieExpandSlots(IE_MACHINES.cokeOven);
const items = Object.fromEntries(slots.map(slot => [slot.label, { icon: "coal" as const }]));
return (
<div className="relative size-40">
<IeLayoutSlots items={items} slots={slots} />
</div>
);
}
Install
$pnpm add @tennantite/ienpm installs the compiled package; use the CLI copy above to adapt the source.
Source
packages/ie/src/ie-layout-slots/index.tsxThe npm package keeps the source tree, so you can copy and adapt it directly.