@yamada-ui/native-table
Version:
Yamada UI native table component
1 lines • 1.52 kB
Source Map (JSON)
{"version":3,"sources":["../src/th.tsx"],"sourcesContent":["import type { CSSUIObject, HTMLUIProps } from \"@yamada-ui/core\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useTableStyles } from \"./native-table\"\n\ninterface ThOptions {\n /**\n * Aligns the cell content to the right.\n *\n * @default false\n *\n * @deprecated Use `numeric` instead.\n */\n isNumeric?: boolean\n /**\n * Aligns the cell content to the right.\n *\n * @default false\n */\n numeric?: boolean\n}\n\nexport interface ThProps extends HTMLUIProps<\"th\">, ThOptions {}\n\nexport const Th = forwardRef<ThProps, \"th\">(\n ({ className, isNumeric, numeric = isNumeric, __css, ...rest }, ref) => {\n const styles = useTableStyles()\n\n const css: CSSUIObject = { ...styles.th, ...__css }\n\n return (\n <ui.th\n ref={ref}\n className={cx(\"ui-table__th\", className)}\n data-is-numeric={numeric}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nTh.displayName = \"Th\"\nTh.__ui__ = \"Th\"\n"],"mappings":";;;;;;AACA,SAAS,YAAY,UAAU;AAC/B,SAAS,UAAU;AA6Bb;AAPC,IAAM,KAAK;AAAA,EAChB,CAAC,EAAE,WAAW,WAAW,UAAU,WAAW,OAAO,GAAG,KAAK,GAAG,QAAQ;AACtE,UAAM,SAAS,eAAe;AAE9B,UAAM,MAAmB,EAAE,GAAG,OAAO,IAAI,GAAG,MAAM;AAElD,WACE;AAAA,MAAC,GAAG;AAAA,MAAH;AAAA,QACC;AAAA,QACA,WAAW,GAAG,gBAAgB,SAAS;AAAA,QACvC,mBAAiB;AAAA,QACjB,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,GAAG,cAAc;AACjB,GAAG,SAAS;","names":[]}