import { assignInlineVars } from '@vanilla-extract/dynamic'; import { withUnit } from '../../utils/with-unit'; import { loading, speedVar } from './styles.css'; export interface LoadingProps { size?: number | string; speed?: number; progress?: number; } export const Loading = ({ size, speed = 1.2, progress = 0.2, }: LoadingProps) => { // allow `string` such as `16px` | `100%` | `1em` const sizeWithUnit = size ? withUnit(size, 'px') : '16px'; return ( ); };