import * as s from './Ball.css' ; import React , { ReactNode } from 'react' ; import cn from 'classnames' ; export type BallColor = 'green' | 'yellow' | 'red' ; const ballClasses = { green : undefined , yellow : s . ballYellow , red : s . ballRed , } ; export type BallProps = { type ? : BallColor ; children ? : string | number | ReadonlyArray < string | number > ; } ; export const Ball = ( { type , children } ) => ( < span className = { cn ( s . ball , ballClasses [ type || 'green' ] ) } > { children } < /span>);