src/components/ResponsiveText.js
/**
 * This component displays text in a responsive font size
 */
This component displays text in a responsive font size
This component displays text in a responsive font size
function ResponsiveText(props) {
  const {
    breakpoint, small, big, value, style,
  } = props;
  const fontSize = window.innerWidth > breakpoint ? big : small;
  return (
    <p style={{ ...style, fontSize }}>
      {
        value
      }
    </p>
  );
}
function ResponsiveText ( props ) { const { breakpoint , small , big , value , style , } = props ; const fontSize = window . innerWidth > breakpoint ? big : small ; return ( < p style = { { ... style , fontSize } } > { value } < / p > ) ; }
This component displays text in a responsive font size
This component displays text in a responsive font size