1.0.3 • Published 2 years ago
rc-dice v1.0.3
rc-dice
A 3D dice using CSS3 animation.
安装 Install
npm install rc-dice -S
# or with yarn
yarn add rc-dice
示例 Usage
Example: https://codesandbox.io/s/rc-dice-rgzjb
基本 Basic
import Dice from 'rc-dice'
const App = () => {
const defaultValue = 3
return (
<Dice defaultValue={defaultValue} onFinish={(value) => console.log(value)} />
);
};
API
参数 Props
名称 Name | 类型Type | 描述 Description |
---|---|---|
defaultValue | number | 初始值,默认1 |
onFinish | (value) => void | 结束回调 callback |