import * as React from 'react' ; import { getRange , roundTo } from '../util' ; import { SpinkitProps , DEFAULT_SIZE , DEFAULT_COLOR } from '../types' ; import { Child , StyledForldingCircle } from './styles' ; const ForldingCircle = ( { size = DEFAULT_SIZE , color = DEFAULT_COLOR , className , } ) => { const count = 12 ; const range = 1.2 ; const circles = getRange ( count ) . map ( ( v ) => ( < Child key = { v } rotate = { roundTo ( ( 360 / count ) * v , 1 ) } delay = { roundTo ( range - ( range / count ) * v , 2 ) } />)); return ( < StyledForldingCircle className = { className } size = { size } color = { color } > { circles } < /StyledForldingCircle>); } ; export default ForldingCircle ;