(props)
| 30 | }; |
| 31 | |
| 32 | function Spinner(props) { |
| 33 | const { |
| 34 | className, |
| 35 | cssModule, |
| 36 | type = 'border', |
| 37 | size, |
| 38 | color, |
| 39 | children = 'Loading...', |
| 40 | tag: Tag = 'div', |
| 41 | ...attributes |
| 42 | } = props; |
| 43 | |
| 44 | const classes = mapToCssModules( |
| 45 | classNames( |
| 46 | className, |
| 47 | size ? `spinner-${type}-${size}` : false, |
| 48 | `spinner-${type}`, |
| 49 | color ? `text-${color}` : false, |
| 50 | ), |
| 51 | cssModule, |
| 52 | ); |
| 53 | |
| 54 | return ( |
| 55 | <Tag role="status" {...attributes} className={classes}> |
| 56 | {children && ( |
| 57 | <span className={mapToCssModules('visually-hidden', cssModule)}> |
| 58 | {children} |
nothing calls this directly
no test coverage detected
searching dependent graphs…