文档目录
马界面
176×166 马/羊驼界面,鞍、马铠与可选箱子。
马
import { HorseScreen } from "./index";
/**
* HorseScreen 预览用例(规格 §6.2):鞍 + 铁马铠,箱子内装小麦
*/
export function HorseScreenDemo() {
return (
<HorseScreen
armor={{ count: 1, icon: "iron-horse-armor", tooltip: "铁马铠" }}
chest
chestItems={[{ count: 64, icon: "wheat", tooltip: "小麦 ×64" }]}
saddle={{ count: 1, icon: "saddle", tooltip: "鞍" }}
title="马"
/>
);
}
安装
CLI 拷贝
$npx shadcn add @tennantite/horse-screennpm 直装
$pnpm add @tennantite/uinpm 方式安装编译产物;需要改造源码请用上方的 CLI 拷贝安装。
源码
packages/ui/src/screens/containers/horse-screen/index.tsxnpm 包保留源码目录,可直接复制改造。