koval-ui
Version:
React components collection with minimalistic design. Supports theming, layout, and input validation.
1 lines • 1.49 kB
Source Map (JSON)
{"version":3,"file":"Table.cjs","sources":["../../../../src/lib/Text/Table.tsx"],"sourcesContent":["import type {MutableRefObject, ReactNode} from 'react';\nimport {forwardRef} from 'react';\nimport classNames from 'classnames';\n\nimport type {DataAttributes, LibraryProps} from '@/internal/LibraryAPI';\n\nimport classes from './Text.module.css';\n\nexport type Props = DataAttributes &\n LibraryProps & {\n children: ReactNode;\n wrapperRef?: MutableRefObject<HTMLDivElement | null>;\n wrapperClassName?: string;\n };\n\nexport const Table = forwardRef<HTMLTableElement, Props>(\n ({children, className, wrapperRef, wrapperClassName, ...nativeProps}, ref) => {\n return (\n <div ref={wrapperRef} className={classNames(classes.tableWrapper, wrapperClassName)}>\n <table {...nativeProps} className={classNames(classes.table, className)} ref={ref}>\n {children}\n </table>\n </div>\n );\n }\n);\n\nTable.displayName = 'Table';\n"],"names":["Table","forwardRef","children","className","wrapperRef","wrapperClassName","nativeProps","ref","jsx","classNames","classes"],"mappings":"gNAeaA,EAAQC,EAAA,WACjB,CAAC,CAAC,SAAAC,EAAU,UAAAC,EAAW,WAAAC,EAAY,iBAAAC,EAAkB,GAAGC,CAAW,EAAGC,IAE9DC,MAAC,OAAI,IAAKJ,EAAY,UAAWK,EAAWC,UAAQ,aAAcL,CAAgB,EAC9E,SAAAG,EAAAA,IAAC,SAAO,GAAGF,EAAa,UAAWG,EAAWC,EAAA,QAAQ,MAAOP,CAAS,EAAG,IAAAI,EACpE,SAAAL,CAAA,CACL,CACJ,CAAA,CAGZ,EAEAF,EAAM,YAAc"}