Documentation
ModTitle
Generic mod title: plain pixel text, absolutely positioned.
左对齐标题右对齐标题
import { ModTitle } from "./index";
export function ModTitleDemo() {
return (
<div className="relative h-16 w-48">
<ModTitle left={0} top={0}>左对齐标题</ModTitle>
<ModTitle right={0} top={16}>右对齐标题</ModTitle>
</div>
);
}
Install
$pnpm add @tennantite/commonnpm installs the compiled package; use the CLI copy above to adapt the source.
Source
packages/mods-core/src/shared/mod-title/index.tsxThe npm package keeps the source tree, so you can copy and adapt it directly.