Skip to content
Tennantite
中文
Documentation

TradingScreen

276×166 panel with a 98×116 trade list and price slots.

Full-screen previewPreview pages are excluded from search indexes
交易
农民 - 新手
物品栏
64

Composition

These are the composable components; the Block only places them at vanilla coordinates.

Code

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" },
        },
      ]}
    />
  );
}