Documentation
IeSpriteButton
IE sprite button with normal / pressed / hover sprite states.
import { IeSpriteButton } from "./index";
export function IeSpriteButtonDemo() {
return (
<div className="relative size-16">
<IeSpriteButton
label="两态按钮"
left={0}
name="sprites/arc_furnace/distribute"
nameOn="sprites/arc_furnace/distribute_hover"
pressed
top={0}
/>
<IeSpriteButton
hoverName="sprites/arc_furnace/distribute_hover"
label="悬停按钮"
left={24}
name="sprites/arc_furnace/distribute"
top={0}
/>
</div>
);
}
Install
$pnpm add @tennantite/ienpm installs the compiled package; use the CLI copy above to adapt the source.
Source
packages/ie/src/ie-sprite-button/index.tsxThe npm package keeps the source tree, so you can copy and adapt it directly.