UNPKG

analytica-frontend-lib

Version:

Repositório público dos componentes utilizados nas plataformas da Analytica Ensino

1 lines 911 B
{"version":3,"sources":["../src/utils/renderTextCell.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { TruncatedText } from '../components/TruncatedText/TruncatedText';\n\n/**\n * Renders a table cell displaying text. Uses TruncatedText so the design-system\n * Tooltip appears only when the text actually overflows the cell width.\n * Useful as a render function for TableProvider column configurations.\n *\n * @param value - Raw cell value from the table row (coerced to string)\n * @returns TruncatedText element showing the string value\n */\nexport const renderTextCell = (value: unknown): ReactElement => {\n const text = typeof value === 'string' ? value : '';\n return <TruncatedText size=\"md\">{text}</TruncatedText>;\n};\n"],"mappings":";;;;;AAaS;AAFF,IAAM,iBAAiB,CAAC,UAAiC;AAC9D,QAAM,OAAO,OAAO,UAAU,WAAW,QAAQ;AACjD,SAAO,oBAAC,iBAAc,MAAK,MAAM,gBAAK;AACxC;","names":[]}