File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed
Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @solved-ac/ui-react" ,
3- "version" : " 0.0.1-alpha.34 " ,
3+ "version" : " 0.0.1-alpha.35 " ,
44 "description" : " React component library used by solved.ac" ,
55 "author" : " shiftpsh" ,
66 "license" : " MIT" ,
Original file line number Diff line number Diff line change 1+ import React , { ElementType } from 'react'
2+ import styled from 'styled-components'
3+ import { PC , PP , PR } from '../../types/PolymorphicElementProps'
4+
5+ const TableContainerContainer = styled . div `
6+ overflow-x: auto;
7+ `
8+
9+ export const TableContainer : PC < 'div' > = React . forwardRef (
10+ < T extends ElementType > ( props : PP < T > , ref ?: PR < T > ) => {
11+ const { as = 'table' , ...rest } = props
12+
13+ return (
14+ < TableContainerContainer
15+ ref = { ref }
16+ as = { as }
17+ { ...rest }
18+ />
19+ )
20+ }
21+ )
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ export * from './Cell'
22export * from './Row'
33export * from './Table'
44export * from './TableBody'
5+ export * from './TableContainer'
56export * from './TableFoot'
67export * from './TableHead'
78
You can’t perform that action at this time.
0 commit comments