import { useMemo } from 'react'; import styled from '@emotion/styled'; export interface Props { sampleText: string; styleName: string; fontStyle: string; } const Container = styled.div` margin-bottom: 40px; `; const Title = styled.span` font-size: 20px; text-decoration: underline; font-weight: 500; `; const TypoBox = ({ sampleText, styleName, fontStyle }: Props) => { const TextDiv = useMemo( () => styled.div` ${fontStyle} `, [fontStyle] ); return ( {styleName} {sampleText} ); }; export default TypoBox;