import React from 'react'
import { Typography } from '../../Typography/Typography'

export const renderTypography = (value, themeTokens, ratePosition, fontColor) => {
  const customProps =
    ratePosition === 'bottom' && value !== '$'
      ? { variant: { size: 'micro' }, tokens: { color: fontColor } }
      : { tokens: { ...themeTokens, color: fontColor } }

  return <Typography {...customProps}>{value}</Typography>
}
