import { css } from 'styled-components' ; export const roundTo = ( n , precision ) : number => Math . round ( n * 10 ** precision ) / 10 ** precision ; export const size = ( width , height = width ) => css `
  width: ${ width };
  height: ${ height };
` ; export const sizePx = ( n ) => size ( `${ n }px` ) ; export type SizeProps = { size : number ; } ; export const propSize = ( { size } ) => sizePx ( size ) ; export type BgColorProps = { color : string ; } ; export const propBgColor = ( { color } ) => css `
  background-color: ${ color };
` ; export type MarginProps = { size ? : number ; } ; export const propMargin = ( { size = 0 } ) => css `
  margin: ${ size }px auto;
` ; export const animationDelay = ( n ) => css `
    animation-delay: ${ n }s;
  ` ; export type DelayProps = { delay : number ; } ; export const propDelay = ( { delay } ) => animationDelay ( delay ) ; export const getRange = ( n ) : number [ ] => Array . from < number > ( new Array < number > ( n ) . keys ( ) ) ;