import { em , math , rem , transparentize } from 'polished' ; import { css , FlattenSimpleInterpolation } from 'styled-components' ; import { themeOptions } from '../options' ; export interface Helpers { addValues ( first , second ) : string ; createRGBA ( color , alpha ) : string ; remCalc ( value ) : string ; emCalc ( value ) : string ; listReset : FlattenSimpleInterpolation ; } export const addValues = ( first , second ) => { return math ( `${ first } + ${ second }` ) ; } ; param color param alpha export const createRGBA = ( color , alpha ) => { const calculatedAmount = 1 - alpha ; return transparentize ( calculatedAmount , color ) ; } ; export const remCalc = ( value ) => { const { htmlFontSize } = themeOptions . getOptions ( ) ; return rem ( value , htmlFontSize ) ; } ; export const emCalc = ( value ) => { const { htmlFontSize } = themeOptions . getOptions ( ) ; return em ( value , htmlFontSize ) ; } ; export const listReset = css `
  list-style-type: none;
  margin: 0;
  padding: 0;
` ;