mirror of
https://github.com/dzeiocom/components.git
synced 2025-04-22 19:02:15 +00:00
Added Overflow X to table element
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
7e26c8d5aa
commit
be01f386d4
@ -17,3 +17,6 @@
|
|||||||
td
|
td
|
||||||
padding 8px
|
padding 8px
|
||||||
text-align left
|
text-align left
|
||||||
|
|
||||||
|
.parent
|
||||||
|
overflow-x auto
|
@ -1,15 +1,20 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
import { buildClassName } from '../Util'
|
||||||
|
|
||||||
import css from './Table.module.styl'
|
import css from './Table.module.styl'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
|
parentClassName?: string
|
||||||
|
className?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class Table extends React.Component<Props> {
|
export default class Table extends React.Component<Props> {
|
||||||
|
|
||||||
public render = () => (
|
public render = () => (
|
||||||
<table className={css.table}>{this.props.children}</table>
|
<div className={buildClassName(css.parent, this.props.parentClassName)}>
|
||||||
|
<table className={buildClassName(css.table, this.props.className)}>{this.props.children}</table>
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user