File tree Expand file tree Collapse file tree 6 files changed +44
-2
lines changed
Expand file tree Collapse file tree 6 files changed +44
-2
lines changed Original file line number Diff line number Diff line change 11import React , { memo } from 'react'
2+ import { useStyleConfig } from '../../hooks'
23import { Pane } from '../../layers'
34import EditableCell from './EditableCell'
45import SearchTableHeaderCell from './SearchTableHeaderCell'
@@ -12,9 +13,22 @@ import TableVirtualBody from './TableVirtualBody'
1213import TextTableCell from './TextTableCell'
1314import TextTableHeaderCell from './TextTableHeaderCell'
1415
16+ const emptyObject = { }
17+
1518const Table = memo ( function Table ( props ) {
1619 const { children, ...rest } = props
17- return < Pane { ...rest } > { children } </ Pane >
20+ const { className, ...boxProps } = useStyleConfig (
21+ 'Table' ,
22+ emptyObject ,
23+ emptyObject ,
24+ emptyObject
25+ )
26+
27+ return (
28+ < Pane className = { className } { ...boxProps } { ...rest } >
29+ { children }
30+ </ Pane >
31+ )
1832} )
1933
2034Table . Body = TableBody
Original file line number Diff line number Diff line change @@ -90,7 +90,6 @@ export default class EditableTable extends React.PureComponent {
9090 onChange = { value => this . setState ( { isSelectable : value } ) }
9191 />
9292 < Pane
93- border
9493 height = "80vh"
9594 display = "flex"
9695 flexGrow = { 0 }
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import Select from './select'
2525import Spinner from './spinner'
2626import Switch from './switch'
2727import Tab from './tab'
28+ import Table from './table'
2829import TableCell from './table-cell'
2930import TableHead from './table-head'
3031import TableRow from './table-row'
@@ -61,6 +62,7 @@ export default {
6162 Spinner,
6263 Switch,
6364 Tab,
65+ Table,
6466 TableCell,
6567 TableHead,
6668 TableRow,
Original file line number Diff line number Diff line change 1+ const baseStyle = { }
2+
3+ const appearances = { }
4+
5+ const sizes = { }
6+
7+ export default {
8+ baseStyle,
9+ appearances,
10+ sizes
11+ }
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import Select from './select'
2525import Spinner from './spinner'
2626import Switch from './switch'
2727import Tab from './tab'
28+ import Table from './table'
2829import TableCell from './table-cell'
2930import TableHead from './table-head'
3031import TableRow from './table-row'
@@ -61,6 +62,7 @@ export default {
6162 Spinner,
6263 Switch,
6364 Tab,
65+ Table,
6466 TableCell,
6567 TableHead,
6668 TableRow,
Original file line number Diff line number Diff line change 1+ const baseStyle = {
2+ borderRadius : 'radii.1' ,
3+ border : 'muted'
4+ }
5+
6+ const appearances = { }
7+
8+ const sizes = { }
9+
10+ export default {
11+ baseStyle,
12+ appearances,
13+ sizes
14+ }
You can’t perform that action at this time.
0 commit comments