File tree Expand file tree Collapse file tree 7 files changed +5
-13
lines changed
Expand file tree Collapse file tree 7 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 1- import type { Table1DTexts } from "~ui/table/table1/Table1DTexts"
2- import { table1DTextDefault } from "~ui/table/table1/Table1DTexts"
31import type { DesktopTableClassNames } from "~ui/table/shared/DesktopTableClassNames"
42import { sharedTableRowClassName } from "~ui/table/shared/sharedTableRowClassName"
3+ import type { Table1DTexts } from "~ui/table/table1/Table1DTexts"
4+ import { table1DTextDefault } from "~ui/table/table1/Table1DTexts"
55import type { Table1Data } from "~ui/table/table1/Table1Data"
66import type { MayHaveClass } from "~ui/utils/MayHaveClass"
77import { classMerge } from "~ui/utils/classMerge"
88
99export interface Table1aDProps < T > extends Table1Data < T > , MayHaveClass {
1010 desktopClasses ?: DesktopTableClassNames
11- translate ?: ( en : string ) => string
1211 texts ?: Table1DTexts
1312}
1413
1514export function Table1D < T > ( p : Table1aDProps < T > ) {
1615 const texts = p . texts ?? table1DTextDefault
17- const noEntriesText = p . translate ? p . translate ( "No entries" ) : texts . noEntries
16+ const noEntriesText = p . texts ?. noEntries ?? texts . noEntries
1817
1918 if ( p . rows . length <= 0 ) return < span class = { "text-lg text-center p-2 pt-6" } > { noEntriesText } </ span >
2019 return (
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import { classMerge } from "~ui/utils/classMerge"
77
88export interface Table1aMProps < T > extends Table1Data < T > , MayHaveClass {
99 mobileClasses ?: MobileTableClassNames
10- translate ?: ( en : string ) => string
1110}
1211
1312export function Table1M < T > ( p : Table1aMProps < T > ) {
@@ -16,7 +15,7 @@ export function Table1M<T>(p: Table1aMProps<T>) {
1615 { p . rows . map ( ( row , y ) => (
1716 < >
1817 < Separator />
19- < Table1MEntry row = { row } columns = { p . columns } mobileClasses = { p . mobileClasses } translate = { p . translate } />
18+ < Table1MEntry row = { row } columns = { p . columns } mobileClasses = { p . mobileClasses } />
2019 </ >
2120 ) ) }
2221 </ div >
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ export type Table1aMEntryProps<T> = {
77 row : T
88 columns : TableColumnDef < T > [ ]
99 mobileClasses ?: MobileTableClassNames
10- translate ?: ( en : string ) => string
1110}
1211
1312export function Table1MEntry < T > ( p : Table1aMEntryProps < T > ) {
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import { classMerge } from "~ui/utils/classMerge"
88
99export interface SortableTableMProps < T > extends Table2Signals < T > , MayHaveClass {
1010 mobileClasses ?: MobileTableClassNames
11- translate ?: ( en : string ) => string
1211}
1312
1413export function Table2M < T > ( p : SortableTableMProps < T > ) {
@@ -18,7 +17,7 @@ export function Table2M<T>(p: SortableTableMProps<T>) {
1817 { ( row , i ) => (
1918 < >
2019 < Separator />
21- < Table1MEntry row = { row } columns = { p . columns . get ( ) } mobileClasses = { p . mobileClasses } translate = { p . translate } />
20+ < Table1MEntry row = { row } columns = { p . columns . get ( ) } mobileClasses = { p . mobileClasses } />
2221 </ >
2322 ) }
2423 </ For >
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ export interface Table2RProps<T> extends Table2Signals<T> {
1111 breakpoint ?: TailwindBreakpoint
1212 desktopClasses ?: DesktopTableClassNames
1313 mobileClasses ?: MobileTableClassNames
14- translate ?: ( en : string ) => string
1514}
1615
1716export function Table2R < T > ( p : Table2RProps < T > ) {
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ export function DemoTable1R() {
1111 desktopClasses = { {
1212 data : "px-3 py-2" ,
1313 } }
14- translate = { ( en ) => ttt ( en ) }
1514 />
1615 )
1716}
Original file line number Diff line number Diff line change 11import { mdiMagicStaff , mdiTrashCan } from "@mdi/js"
2- import { ttt } from "~ui/i18n/ttt"
32import { formModeIcon } from "~ui/input/form/formModeIcon"
43import { InputS } from "~ui/input/input/InputS"
54import { Button } from "~ui/interactive/button/Button"
@@ -27,7 +26,6 @@ export function DemoTable2R() {
2726 desktopClasses = { {
2827 data : "px-3 py-2" ,
2928 } }
30- translate = { ( en ) => ttt ( en ) }
3129 />
3230 </ >
3331 )
You can’t perform that action at this time.
0 commit comments