@xyo-network/react-payload-table 3.0.2 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/components/DynamicTable/DynamicTableRow.d.ts +15 -0
- package/dist/browser/components/DynamicTable/DynamicTableRow.d.ts.map +1 -0
- package/dist/browser/components/DynamicTable/PayloadDynamicTableColumnConfig.d.ts +16 -0
- package/dist/browser/components/DynamicTable/PayloadDynamicTableColumnConfig.d.ts.map +1 -0
- package/dist/browser/components/DynamicTable/Table.d.ts +14 -0
- package/dist/browser/components/DynamicTable/Table.d.ts.map +1 -0
- package/dist/browser/components/DynamicTable/index.d.ts +4 -0
- package/dist/browser/components/DynamicTable/index.d.ts.map +1 -0
- package/dist/browser/components/Table/PayloadTableColumnConfig.d.ts +11 -0
- package/dist/browser/components/Table/PayloadTableColumnConfig.d.ts.map +1 -0
- package/dist/browser/components/Table/Table.d.ts +26 -0
- package/dist/browser/components/Table/Table.d.ts.map +1 -0
- package/dist/browser/components/Table/TableBody.d.ts +4 -0
- package/dist/browser/components/Table/TableBody.d.ts.map +1 -0
- package/dist/browser/components/Table/TableFooter.d.ts +4 -0
- package/dist/browser/components/Table/TableFooter.d.ts.map +1 -0
- package/dist/browser/components/Table/TableHead.d.ts +4 -0
- package/dist/browser/components/Table/TableHead.d.ts.map +1 -0
- package/dist/browser/components/Table/TablePagination.d.ts +11 -0
- package/dist/browser/components/Table/TablePagination.d.ts.map +1 -0
- package/dist/browser/components/Table/TableRow.d.ts +16 -0
- package/dist/browser/components/Table/TableRow.d.ts.map +1 -0
- package/dist/browser/components/Table/TableRowNoData.d.ts +9 -0
- package/dist/browser/components/Table/TableRowNoData.d.ts.map +1 -0
- package/dist/browser/components/Table/index.d.ts +7 -0
- package/dist/browser/components/Table/index.d.ts.map +1 -0
- package/dist/browser/components/Table/types/PaginationEventNouns.d.ts +2 -0
- package/dist/browser/components/Table/types/PaginationEventNouns.d.ts.map +1 -0
- package/dist/browser/components/Table/types/PayloadTableBodyProps.d.ts +17 -0
- package/dist/browser/components/Table/types/PayloadTableBodyProps.d.ts.map +1 -0
- package/dist/browser/components/Table/types/PayloadTableFooterProps.d.ts +13 -0
- package/dist/browser/components/Table/types/PayloadTableFooterProps.d.ts.map +1 -0
- package/dist/browser/components/Table/types/PayloadTableHeadProps.d.ts +6 -0
- package/dist/browser/components/Table/types/PayloadTableHeadProps.d.ts.map +1 -0
- package/dist/browser/components/Table/types/index.d.ts +5 -0
- package/dist/browser/components/Table/types/index.d.ts.map +1 -0
- package/dist/browser/components/index.d.ts +3 -0
- package/dist/browser/components/index.d.ts.map +1 -0
- package/dist/browser/index.d.ts +2 -133
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.mjs.map +1 -1
- package/package.json +62 -54
- package/src/components/DynamicTable/DynamicTable.stories.tsx +7 -7
- package/src/components/DynamicTable/DynamicTableRow.tsx +8 -5
- package/src/components/DynamicTable/PayloadDynamicTableColumnConfig.ts +66 -22
- package/src/components/DynamicTable/Table.tsx +11 -8
- package/src/components/Table/FetchMoreTable.stories.tsx +9 -8
- package/src/components/Table/PayloadTableColumnConfig.ts +3 -1
- package/src/components/Table/Table.stories.tsx +10 -11
- package/src/components/Table/Table.tsx +6 -2
- package/src/components/Table/TableBody.tsx +3 -1
- package/src/components/Table/TableFooter.tsx +5 -7
- package/src/components/Table/TableHead.tsx +3 -1
- package/src/components/Table/TablePagination.tsx +17 -4
- package/src/components/Table/TableRow.tsx +3 -1
- package/src/components/Table/TableRowNoData.tsx +7 -5
- package/xy.config.ts +1 -3
|
@@ -20,35 +20,79 @@ export interface PayloadDynamicTableColumnConfig {
|
|
|
20
20
|
|
|
21
21
|
export const payloadDynamicTableColumnConfigDefaults = (): PayloadDynamicTableColumnConfig => {
|
|
22
22
|
const xs: PayloadDynamicTableColumnHeadData[] = [
|
|
23
|
-
{
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
{
|
|
24
|
+
alignment: 'left', name: 'Hash', slug: 'hash', width: '100%',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
alignment: 'left', name: 'Schema', slug: 'schema', width: '50px',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
alignment: 'left', name: 'Valid', slug: 'valid', width: '50px',
|
|
31
|
+
},
|
|
26
32
|
]
|
|
27
33
|
const sm: PayloadDynamicTableColumnHeadData[] = [
|
|
28
|
-
{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
{
|
|
34
|
+
{
|
|
35
|
+
alignment: 'left', name: 'Icon', slug: 'icon', width: '50px',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
alignment: 'left', name: 'Hash', slug: 'hash', width: '100%',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
alignment: 'left', name: 'Schema', slug: 'schema', width: '50px',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
alignment: 'left', name: 'Valid', slug: 'valid', width: '50px',
|
|
45
|
+
},
|
|
32
46
|
]
|
|
33
47
|
const md: PayloadDynamicTableColumnHeadData[] = [
|
|
34
|
-
{
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
{
|
|
48
|
+
{
|
|
49
|
+
alignment: 'left', name: 'Icon', slug: 'icon', width: '50px',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
alignment: 'left', name: 'Hash', slug: 'hash', width: '100%',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
alignment: 'left', name: 'Schema', slug: 'schema', width: '50px',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
alignment: 'left', name: 'Valid', slug: 'valid', width: '50px',
|
|
59
|
+
},
|
|
38
60
|
]
|
|
39
61
|
const lg: PayloadDynamicTableColumnHeadData[] = [
|
|
40
|
-
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
{
|
|
44
|
-
|
|
62
|
+
{
|
|
63
|
+
alignment: 'left', name: 'Icon', slug: 'icon', width: '50px',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
alignment: 'left', name: 'Hash', slug: 'hash', width: '100%',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
alignment: 'left', name: 'Schema', slug: 'schema', width: '50px',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
alignment: 'left', name: 'Render', slug: 'render', width: '50px',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
alignment: 'left', name: 'Valid', slug: 'valid', width: '50px',
|
|
76
|
+
},
|
|
45
77
|
]
|
|
46
78
|
const xl: PayloadDynamicTableColumnHeadData[] = [
|
|
47
|
-
{
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{
|
|
51
|
-
|
|
79
|
+
{
|
|
80
|
+
alignment: 'left', name: 'Icon', slug: 'icon', width: '50px',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
alignment: 'left', name: 'Hash', slug: 'hash', width: '100%',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
alignment: 'left', name: 'Schema', slug: 'schema', width: '50px',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
alignment: 'left', name: 'Render', slug: 'render', width: '50px',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
alignment: 'left', name: 'Valid', slug: 'valid', width: '50px',
|
|
93
|
+
},
|
|
52
94
|
]
|
|
53
|
-
return {
|
|
95
|
+
return {
|
|
96
|
+
lg, md, sm, xl, xs,
|
|
97
|
+
}
|
|
54
98
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
FirstPage as FirstPageIcon, KeyboardArrowLeft, KeyboardArrowRight, LastPage as LastPageIcon,
|
|
3
|
+
} from '@mui/icons-material'
|
|
4
|
+
import type { TableProps } from '@mui/material'
|
|
4
5
|
import {
|
|
5
6
|
Alert,
|
|
6
7
|
Box,
|
|
@@ -20,7 +21,9 @@ import type { Payload } from '@xyo-network/payload-model'
|
|
|
20
21
|
import { ThrownErrorBoundary } from '@xyo-network/react-error'
|
|
21
22
|
import { usePayloadHashes } from '@xyo-network/react-shared'
|
|
22
23
|
import type { ReactNode } from 'react'
|
|
23
|
-
import React, {
|
|
24
|
+
import React, {
|
|
25
|
+
useEffect, useMemo, useState,
|
|
26
|
+
} from 'react'
|
|
24
27
|
|
|
25
28
|
import { PayloadDynamicTableRow } from './DynamicTableRow.tsx'
|
|
26
29
|
import type { PayloadDynamicTableColumnConfig } from './PayloadDynamicTableColumnConfig.ts'
|
|
@@ -44,7 +47,9 @@ interface TablePaginationActionsProps {
|
|
|
44
47
|
|
|
45
48
|
function TablePaginationActions(props: TablePaginationActionsProps) {
|
|
46
49
|
const theme = useTheme()
|
|
47
|
-
const {
|
|
50
|
+
const {
|
|
51
|
+
count, page, rowsPerPage, onPageChange,
|
|
52
|
+
} = props
|
|
48
53
|
|
|
49
54
|
const handleFirstPageButtonClick = (event: React.MouseEvent<HTMLButtonElement>) => {
|
|
50
55
|
onPageChange(event, 0)
|
|
@@ -179,9 +184,7 @@ export const PayloadDynamicTable: React.FC<PayloadDynamicTableProps> = ({
|
|
|
179
184
|
rowsPerPage={rowsPerPage}
|
|
180
185
|
page={page}
|
|
181
186
|
SelectProps={{
|
|
182
|
-
inputProps: {
|
|
183
|
-
'aria-label': 'rows per page',
|
|
184
|
-
},
|
|
187
|
+
inputProps: { 'aria-label': 'rows per page' },
|
|
185
188
|
native: true,
|
|
186
189
|
}}
|
|
187
190
|
onPageChange={handleChangePage}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Button, Typography } from '@mui/material'
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
Decorator, Meta, StoryFn,
|
|
4
|
+
} from '@storybook/react'
|
|
3
5
|
import { delay } from '@xylabs/delay'
|
|
4
6
|
import type { Payload } from '@xyo-network/payload-model'
|
|
5
7
|
import { useEvent } from '@xyo-network/react-event'
|
|
@@ -12,7 +14,9 @@ const newPayloads = () =>
|
|
|
12
14
|
Array(50)
|
|
13
15
|
// eslint-disable-next-line unicorn/no-useless-undefined
|
|
14
16
|
.fill(undefined)
|
|
15
|
-
.map((_, index) => ({
|
|
17
|
+
.map((_, index) => ({
|
|
18
|
+
index, random: Math.random(), schema: 'network.xyo.stories.test',
|
|
19
|
+
}))
|
|
16
20
|
|
|
17
21
|
// simulating the end of the list
|
|
18
22
|
const maxPayloads = 200
|
|
@@ -31,9 +35,10 @@ const NewPayloadsDecorator: Decorator = (Story, args) => {
|
|
|
31
35
|
|
|
32
36
|
useEffect(() => {
|
|
33
37
|
// simulate initial async payloads
|
|
34
|
-
setTimeout(() => {
|
|
38
|
+
const timeout = setTimeout(() => {
|
|
35
39
|
addToTotalPayloads(testPayloads)
|
|
36
40
|
}, 500)
|
|
41
|
+
return () => clearTimeout(timeout)
|
|
37
42
|
}, [])
|
|
38
43
|
|
|
39
44
|
const addPayloads = () => {
|
|
@@ -73,11 +78,7 @@ const NewPayloadsDecorator: Decorator = (Story, args) => {
|
|
|
73
78
|
const StorybookEntry = {
|
|
74
79
|
argTypes: {},
|
|
75
80
|
component: PayloadTable,
|
|
76
|
-
parameters: {
|
|
77
|
-
docs: {
|
|
78
|
-
page: null,
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
+
parameters: { docs: { page: null } },
|
|
81
82
|
title: 'payload/FetchMoreTable',
|
|
82
83
|
} as Meta<typeof PayloadTable>
|
|
83
84
|
|
|
@@ -23,5 +23,7 @@ export const payloadTableColumnConfigDefaults = (): PayloadTableColumnConfig =>
|
|
|
23
23
|
const md: PayloadTableColumnSlug[] = ['hash', 'schema', 'valid']
|
|
24
24
|
const lg: PayloadTableColumnSlug[] = ['hash', 'schema', 'valid']
|
|
25
25
|
const xl: PayloadTableColumnSlug[] = ['hash', 'schema', 'valid']
|
|
26
|
-
return {
|
|
26
|
+
return {
|
|
27
|
+
lg, md, sm, xl, xs,
|
|
28
|
+
}
|
|
27
29
|
}
|
|
@@ -11,11 +11,7 @@ import { PayloadTable } from './Table.tsx'
|
|
|
11
11
|
const StorybookEntry = {
|
|
12
12
|
argTypes: {},
|
|
13
13
|
component: PayloadTable,
|
|
14
|
-
parameters: {
|
|
15
|
-
docs: {
|
|
16
|
-
page: null,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
14
|
+
parameters: { docs: { page: null } },
|
|
19
15
|
title: 'payload/Table',
|
|
20
16
|
} as Meta<typeof PayloadTable>
|
|
21
17
|
|
|
@@ -55,9 +51,7 @@ const payloads: Payload[] = [
|
|
|
55
51
|
]
|
|
56
52
|
|
|
57
53
|
const WithData = Template.bind({})
|
|
58
|
-
WithData.args = {
|
|
59
|
-
payloads,
|
|
60
|
-
}
|
|
54
|
+
WithData.args = { payloads }
|
|
61
55
|
|
|
62
56
|
const WithOutStickyHeaderFooter = Template.bind({})
|
|
63
57
|
WithOutStickyHeaderFooter.args = {
|
|
@@ -72,8 +66,11 @@ WithDataAndMaxSchemaDepth.args = {
|
|
|
72
66
|
}
|
|
73
67
|
|
|
74
68
|
const WithInvalid = Template.bind({})
|
|
75
|
-
|
|
76
|
-
const {
|
|
69
|
+
|
|
70
|
+
const {
|
|
71
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
72
|
+
schema, ...badPayload
|
|
73
|
+
} = sampleIdPayload
|
|
77
74
|
|
|
78
75
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
79
76
|
// @ts-ignore
|
|
@@ -85,6 +82,8 @@ WithNoResults.args = { payloads: [] }
|
|
|
85
82
|
const WithLoading = Template.bind({})
|
|
86
83
|
WithLoading.args = { loading: true, payloads: [] }
|
|
87
84
|
|
|
88
|
-
export {
|
|
85
|
+
export {
|
|
86
|
+
Default, WithData, WithDataAndMaxSchemaDepth, WithInvalid, WithLoading, WithNoResults, WithOutStickyHeaderFooter,
|
|
87
|
+
}
|
|
89
88
|
|
|
90
89
|
export default StorybookEntry
|
|
@@ -3,14 +3,18 @@ import type { Payload } from '@xyo-network/payload-model'
|
|
|
3
3
|
import type { TableExProps } from '@xyo-network/react-table'
|
|
4
4
|
import { TableEx } from '@xyo-network/react-table'
|
|
5
5
|
import type { ComponentType } from 'react'
|
|
6
|
-
import React, {
|
|
6
|
+
import React, {
|
|
7
|
+
forwardRef, useEffect, useMemo, useState,
|
|
8
|
+
} from 'react'
|
|
7
9
|
|
|
8
10
|
import type { PayloadTableColumnConfig } from './PayloadTableColumnConfig.ts'
|
|
9
11
|
import { PayloadTableBody } from './TableBody.tsx'
|
|
10
12
|
import { PayloadTableFooter } from './TableFooter.tsx'
|
|
11
13
|
import { PayloadTableHead } from './TableHead.tsx'
|
|
12
14
|
import { TableRowNoData } from './TableRowNoData.tsx'
|
|
13
|
-
import type {
|
|
15
|
+
import type {
|
|
16
|
+
PayloadTableBodyProps, PayloadTableFooterProps, PayloadTableHeadProps,
|
|
17
|
+
} from './types/index.ts'
|
|
14
18
|
|
|
15
19
|
export interface PayloadTableProps extends TableExProps {
|
|
16
20
|
PayloadTableBodyComponent?: ComponentType<PayloadTableBodyProps>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Alert, TableBody, Typography,
|
|
3
|
+
} from '@mui/material'
|
|
2
4
|
import { ThrownErrorBoundary } from '@xyo-network/react-error'
|
|
3
5
|
import { usePayloadHashes } from '@xyo-network/react-shared'
|
|
4
6
|
import type { ReactNode } from 'react'
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
styled, TablePagination, TableRow,
|
|
3
|
+
} from '@mui/material'
|
|
2
4
|
import { TableFooterEx } from '@xyo-network/react-table'
|
|
3
5
|
import React from 'react'
|
|
4
6
|
|
|
@@ -23,9 +25,7 @@ export const PayloadTableFooter: React.FC<PayloadTableFooterProps> = ({
|
|
|
23
25
|
rowsPerPage={rowsPerPage ?? 10}
|
|
24
26
|
page={page ?? 0}
|
|
25
27
|
SelectProps={{
|
|
26
|
-
inputProps: {
|
|
27
|
-
'aria-label': 'rows per page',
|
|
28
|
-
},
|
|
28
|
+
inputProps: { 'aria-label': 'rows per page' },
|
|
29
29
|
native: true,
|
|
30
30
|
}}
|
|
31
31
|
onPageChange={handleChangePage ?? (() => {})}
|
|
@@ -38,9 +38,7 @@ export const PayloadTableFooter: React.FC<PayloadTableFooterProps> = ({
|
|
|
38
38
|
)
|
|
39
39
|
|
|
40
40
|
const StyledTablePagination = styled(TablePagination)(({ theme }) => ({
|
|
41
|
-
'& > .MuiToolbar-root': {
|
|
42
|
-
paddingLeft: theme.spacing(1),
|
|
43
|
-
},
|
|
41
|
+
'& > .MuiToolbar-root': { paddingLeft: theme.spacing(1) },
|
|
44
42
|
'borderTop': '1px solid',
|
|
45
43
|
'borderTopColor': theme.palette.divider,
|
|
46
44
|
}))
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
FirstPage as FirstPageIcon, KeyboardArrowLeft, KeyboardArrowRight, LastPage as LastPageIcon,
|
|
3
|
+
} from '@mui/icons-material'
|
|
4
|
+
import {
|
|
5
|
+
Box, CircularProgress, IconButton, useTheme,
|
|
6
|
+
} from '@mui/material'
|
|
3
7
|
import { useEvent } from '@xyo-network/react-event'
|
|
4
8
|
import React from 'react'
|
|
5
9
|
|
|
@@ -14,7 +18,9 @@ export interface TablePaginationActionsProps {
|
|
|
14
18
|
rowsPerPage: number
|
|
15
19
|
}
|
|
16
20
|
|
|
17
|
-
export function TablePaginationActions({
|
|
21
|
+
export function TablePaginationActions({
|
|
22
|
+
count, enableNextPage, loading, onPageChange, page, rowsPerPage,
|
|
23
|
+
}: TablePaginationActionsProps) {
|
|
18
24
|
const theme = useTheme()
|
|
19
25
|
const [paginationRef, paginationDispatch] = useEvent<HTMLButtonElement, PaginationNouns>()
|
|
20
26
|
|
|
@@ -41,7 +47,14 @@ export function TablePaginationActions({ count, enableNextPage, loading, onPageC
|
|
|
41
47
|
return (
|
|
42
48
|
<>
|
|
43
49
|
{loading
|
|
44
|
-
?
|
|
50
|
+
? (
|
|
51
|
+
<CircularProgress
|
|
52
|
+
size="small"
|
|
53
|
+
sx={{
|
|
54
|
+
height: theme.spacing(2), position: 'absolute', width: theme.spacing(2),
|
|
55
|
+
}}
|
|
56
|
+
/>
|
|
57
|
+
)
|
|
45
58
|
: null}
|
|
46
59
|
<Box sx={{ flexShrink: 0, ml: 2.5 }}>
|
|
47
60
|
<IconButton onClick={handleFirstPageButtonClick} disabled={page === 0} aria-label="first page">
|
|
@@ -4,7 +4,9 @@ import {
|
|
|
4
4
|
WarningAmberRounded as WarningAmberRoundedIcon,
|
|
5
5
|
} from '@mui/icons-material'
|
|
6
6
|
import type { TableCellProps, TableRowProps } from '@mui/material'
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
alpha, TableCell, TableRow, Typography,
|
|
9
|
+
} from '@mui/material'
|
|
8
10
|
import type { Hash } from '@xylabs/hex'
|
|
9
11
|
import { usePromise } from '@xylabs/react-promise'
|
|
10
12
|
import { useBreakpoint } from '@xylabs/react-shared'
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { TableRowProps, TypographyProps } from '@mui/material'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
styled, TableCell, TableRow, Typography,
|
|
4
|
+
} from '@mui/material'
|
|
3
5
|
import React from 'react'
|
|
4
6
|
|
|
5
7
|
export interface TableRowNoDataProps extends TableRowProps {
|
|
@@ -8,7 +10,9 @@ export interface TableRowNoDataProps extends TableRowProps {
|
|
|
8
10
|
typographyProps?: TypographyProps
|
|
9
11
|
}
|
|
10
12
|
|
|
11
|
-
export const TableRowNoData: React.FC<TableRowNoDataProps> = ({
|
|
13
|
+
export const TableRowNoData: React.FC<TableRowNoDataProps> = ({
|
|
14
|
+
additionalCells, hideBorder = false, typographyProps, ...props
|
|
15
|
+
}) => {
|
|
12
16
|
return (
|
|
13
17
|
<TableRow {...props}>
|
|
14
18
|
<StyledTableCell hideBorder={hideBorder}>
|
|
@@ -32,6 +36,4 @@ interface StyledTableCellProps {
|
|
|
32
36
|
const StyledTableCell = styled(TableCell, {
|
|
33
37
|
name: 'StyledTableCell',
|
|
34
38
|
shouldForwardProp: (prop: string) => prop !== 'hideBorder',
|
|
35
|
-
})<StyledTableCellProps>(({ hideBorder }) => ({
|
|
36
|
-
...(hideBorder && { border: 'none' }),
|
|
37
|
-
}))
|
|
39
|
+
})<StyledTableCellProps>(({ hideBorder }) => ({ ...(hideBorder && { border: 'none' }) }))
|