Documentation
TradingScreen
276×166 panel with a 98×116 trade list and price slots.
交易
农民 - 新手
物品栏
64
import { TradingScreen } from "./index";
/**
* TradingScreen 预览用例(规格 §6.2)
*/
export function TradingScreenDemo() {
return (
<TradingScreen
hotbarItems={[{ count: 64, icon: "dirt-block" }]}
title="农民 - 新手"
trades={[
{
inputA: { count: 20, icon: "wheat", tooltip: "小麦 ×20" },
output: { icon: "emerald", tooltip: "绿宝石" },
},
{
inputA: { count: 1, icon: "emerald", tooltip: "绿宝石" },
output: { count: 6, icon: "bread", tooltip: "面包 ×6" },
},
]}
/>
);
}
Install
CLI copy
$npx shadcn add @tennantite/trading-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/trading-screen/index.tsxThe npm package keeps the source tree, so you can copy and adapt it directly.