UNPKG

@swrpg-online/react-dice

Version:

React components for displaying Star Wars RPG narrative and numeric dice assets

32 lines (31 loc) 903 B
/** * @fileoverview A React component for rendering various types of dice (numeric and narrative) * with support for different themes and formats. */ import * as React from 'react'; import { DieProps } from './types'; /** * A React component that renders dice for tabletop gaming applications. * Supports both numeric (d4, d6, etc.) and narrative dice types with various themes and formats. * * Features: * - Supports SVG and image formats * - Handles multiple D4 variants * - Provides loading and error states * - Supports custom styling and theming * * @component * @example * // Render a standard d20 showing face 20 * <Die type="d20" face={20} /> * * @example * // Render a boost die showing two advantages * <Die * type="boost" * face="Advantage-Advantage" * className="large-die" * style={{ width: '100px' }} * /> */ export declare const Die: React.FC<DieProps>;