mirror of
https://github.com/dzeiocom/components.git
synced 2025-06-08 17:19:55 +00:00
feat: Add parent elements to Col component
Signed-off-by: Avior <f.bouillon@aptatio.com>
This commit is contained in:
parent
e105399e15
commit
931062a3e7
@ -1,8 +1,9 @@
|
|||||||
|
import { objectOmit } from '@dzeio/object-util'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { buildClassName } from '../Util'
|
import { buildClassName } from '../Util'
|
||||||
import css from './Col.module.styl'
|
import css from './Col.module.styl'
|
||||||
|
|
||||||
interface Props {
|
interface Props extends React.HTMLAttributes<HTMLDivElement> {
|
||||||
size?: 0|1|2|3|4|5|6|7|8|9|10|11|12
|
size?: 0|1|2|3|4|5|6|7|8|9|10|11|12
|
||||||
offset?: 1|2|3|4|5|6|7|8|9|10|11
|
offset?: 1|2|3|4|5|6|7|8|9|10|11
|
||||||
children?: React.ReactNode
|
children?: React.ReactNode
|
||||||
@ -21,10 +22,25 @@ interface Props {
|
|||||||
mobileGrow?: boolean
|
mobileGrow?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default class Col extends React.Component<Props> {
|
export default class Col extends React.Component<Props> {
|
||||||
|
|
||||||
public render = () => (
|
public render = () => (
|
||||||
<div className={buildClassName(
|
<div {...objectOmit(
|
||||||
|
this.props,
|
||||||
|
"size",
|
||||||
|
"offset",
|
||||||
|
"children",
|
||||||
|
"className",
|
||||||
|
"nogrow",
|
||||||
|
"tabletSize",
|
||||||
|
"tabletoffset",
|
||||||
|
"tabletGrow",
|
||||||
|
"mobileSize",
|
||||||
|
"mobileoffset",
|
||||||
|
"mobileGrow"
|
||||||
|
)} className={buildClassName(
|
||||||
css.col,
|
css.col,
|
||||||
|
|
||||||
// Normal
|
// Normal
|
||||||
|
Loading…
x
Reference in New Issue
Block a user