Documentation
EnchantingScreen
Item + lapis slots and three 108×19 enchantment option buttons.
附魔
import { EnchantingScreen } from "./index";
/**
* EnchantingScreen 预览用例(规格 §6.2)
*/
export function EnchantingScreenDemo() {
return (
<EnchantingScreen
availableLevel={30}
item={{ icon: "sword", tooltip: "铁剑" }}
lapis={{ count: 16, icon: "lapis-lazuli", tooltip: "青金石" }}
options={[
{ lapisCost: 1, level: 1, xpCost: 2 },
{ label: "锋利 III", lapisCost: 2, level: 2, xpCost: 11 },
{ label: "锋利 IV", lapisCost: 3, level: 3, xpCost: 30 },
]}
title="附魔"
/>
);
}
Install
CLI copy
$npx shadcn add @tennantite/enchanting-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/enchanting-screen/index.tsxThe npm package keeps the source tree, so you can copy and adapt it directly.