Documentation
IfRedstoneButton
IF redstone mode button at (154,84): IGNORE → NO_REDSTONE → WITH_REDSTONE → ONCE.
import { useState } from "react";
import type { IfRedstoneMode } from "../if-markers";
import { IfRedstoneButton } from "./index";
export function IfRedstoneButtonDemo() {
const [mode, setMode] = useState<IfRedstoneMode>("ignore");
return (
<div className="relative h-32 w-48">
<IfRedstoneButton onClick={() => { setMode("with_redstone"); }} value={mode} />
</div>
);
}
Install
$pnpm add @tennantite/industrialforegoingnpm installs the compiled package; use the CLI copy above to adapt the source.
Source
packages/industrialforegoing/src/if-redstone-button/index.tsxThe npm package keeps the source tree, so you can copy and adapt it directly.