Documentation
ChestScreen
176×(114+18×rows) panel for single (3 rows) and double (6 rows) chests.
箱子
8
64
12
import { ChestScreen } from "./index";
/**
* ChestScreen 预览用例(规格 §6.2)
*/
export function ChestScreenDemo() {
return (
<ChestScreen
hotbarItems={[
{ count: 64, icon: "stone-block" },
{ icon: "grass-block" },
{ count: 12, icon: "diamond" },
]}
items={[
{ count: 27, icon: "dirt-block", tooltip: "泥土 ×27" },
{ count: 8, icon: "apple" },
{ icon: "sword" },
]}
rows={3}
selectedIndex={1}
title="箱子"
/>
);
}
Install
CLI copy
$npx shadcn add @tennantite/chest-screennpm install
$pnpm add @tennantite/uinpm installs the compiled package; use the CLI copy above to adapt the source.
Source
packages/ui/src/screens/containers/chest-screen/index.tsxThe npm package keeps the source tree, so you can copy and adapt it directly.