Documentation
FdRecipeBookButton
FD recipe book toggle: the vanilla 20×18 button sprite at a fixed (5,34) inside the panel, state exposed through aria-pressed.
import { useState } from "react";
import { FdRecipeBookButton } from "./index";
export function FdRecipeBookButtonDemo() {
const [open, setOpen] = useState(false);
return (
<div className="relative h-12 w-24">
<FdRecipeBookButton left={0} onToggle={() => setOpen(value => !value)} open={open} top={0} />
</div>
);
}
Install
$pnpm add @tennantite/farmersdelightnpm installs the compiled package; use the CLI copy above to adapt the source.
Source
packages/farmersdelight/src/fd-recipe-book-button/index.tsxThe npm package keeps the source tree, so you can copy and adapt it directly.