Documentation
ModSlotGrid
Generic mod slot grid: row-major, padded to rows × columns.
import { ModSlotGrid } from "./index";
export function ModSlotGridDemo() {
return (
<div className="relative h-24 w-48">
<ModSlotGrid
columns={2}
items={[{ icon: "diamond" }, { icon: "coal" }]}
labelPrefix="demo-slot"
left={8}
rows={2}
top={8}
/>
</div>
);
}
Install
$pnpm add @tennantite/commonnpm installs the compiled package; use the CLI copy above to adapt the source.
Source
packages/mods-core/src/shared/mod-slot-grid/index.tsxThe npm package keeps the source tree, so you can copy and adapt it directly.