UNPKG

koval-ui

Version:

React components collection with minimalistic design. Supports theming, layout, and input validation.

1 lines 1.09 kB
{"version":3,"file":"ViewDateCell.cjs","sources":["../../../../../src/lib/DataTable/cells/ViewDateCell.tsx"],"sourcesContent":["import type {ComponentProps, FC} from 'react';\n\nimport {DateTime} from '@/lib/DateTime';\nimport type {Locale} from '@/internal/locale';\n\nimport classes from './Cells.module.css';\nimport type {CellComponent} from './../types.ts';\n\nexport type Props = ComponentProps<CellComponent>;\n\nexport const ViewDateCell: FC<Props> = ({value, cellContext, ...restProps}) => {\n const locale = cellContext.table.options.meta?.locale as Locale;\n return (\n <div className={classes.viewDateCell}>\n <DateTime {...restProps} value={String(value)} locale={locale} />\n </div>\n );\n};\n"],"names":["ViewDateCell","value","cellContext","restProps","locale","jsx","classes","DateTime"],"mappings":"+MAUaA,EAA0B,CAAC,CAAC,MAAAC,EAAO,YAAAC,EAAa,GAAGC,KAAe,CAC3E,MAAMC,EAASF,EAAY,MAAM,QAAQ,MAAM,OAC/C,OACIG,EAAAA,IAAC,MAAA,CAAI,UAAWC,EAAAA,QAAQ,aACpB,SAAAD,EAAAA,IAACE,EAAAA,SAAA,CAAU,GAAGJ,EAAW,MAAO,OAAOF,CAAK,EAAG,OAAAG,EAAgB,EACnE,CAER"}