import React from 'react' import type { SpinnerProps } from './spinner' import { classNames } from '../../utils/classNames' import styles from './spinner.module.scss' export type Props = SpinnerProps const Spinner = ({ color, width, speed, size, dashArray }: Props) => { const classes = classNames([ styles.spinner, dashArray && styles.dashed ]) const stylesVariable = { ...(color && { '--w-spinner-color': color }), ...(width && { '--w-spinner-width': `${width}px;` }), ...(speed && { '--w-spinner-speed': `${speed}s;` }), ...(size && { '--w-spinner-size': `${size}px;` }), ...(dashArray && { '--w-spinner-dash': dashArray }) } as React.CSSProperties return ( ) } export default Spinner