UNPKG

@scriptless/react-dice

Version:

A React dice component.

27 lines (23 loc) 888 B
import { ReactNode, CSSProperties } from 'react'; type DicePropType = { borderColor?: string; borderRadius?: number; borderWidth?: number; backgroundColor?: string; pipColor?: string; size?: number; pipSize?: number; initialValue?: number; onChange?: (value?: number) => void; getNextValue?: (() => number) | (() => Promise<number>); disabled?: boolean; }; declare const Dice: ({ initialValue, disabled: propsDisabled, onChange, getNextValue, size: contentSize, pipSize, borderColor, borderRadius, borderWidth, backgroundColor, pipColor, }: DicePropType) => JSX.Element; declare const DiceGroup: ({ onChange, children, className, style, disabled, }: { onChange: (values: number[]) => void; children: ReactNode; className?: string; style?: CSSProperties; disabled?: boolean; }) => JSX.Element; export { Dice, DiceGroup };