import React, { forwardRef } from 'react'; import { styled } from 'styled-components'; export interface TextProps extends React.ComponentProps<'p'> { font?: 'default' | 'mono'; weight?: string; warp?: 'normal' | 'nowrap' | 'pre' | 'pre-wrap'; size?: string; color?: string; lineHeight?: string; } interface StyledTextProps { $font?: 'default' | 'mono'; $weight?: string; $warp?: 'normal' | 'nowrap' | 'pre' | 'pre-wrap'; $size?: string; $color?: string; $lineHeight?: string; } const StyledText = styled.p` font-family: ${(props) => props.$font === 'mono' ? 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace' : 'inherit'}; font-weight: ${(props) => props.$weight || '400'}; font-size: ${(props) => props.$size || '16px'}; color: ${(props) => props.$color || 'inherit'}; white-space: ${(props) => props.$warp || 'normal'}; line-height: ${(props) => props.$lineHeight || '1.5'}; `; export const Text = forwardRef( ({ font, weight, warp, size, color, children, lineHeight, ...props }, ref) => { return ( {children} ); } );