mirror of
https://github.com/dzeiocom/components.git
synced 2025-04-23 19:32:14 +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 { buildClassName } from '../Util'
|
||||
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
|
||||
offset?: 1|2|3|4|5|6|7|8|9|10|11
|
||||
children?: React.ReactNode
|
||||
@ -21,10 +22,25 @@ interface Props {
|
||||
mobileGrow?: boolean
|
||||
}
|
||||
|
||||
|
||||
|
||||
export default class Col extends React.Component<Props> {
|
||||
|
||||
public render = () => (
|
||||
<div className={buildClassName(
|
||||
<div {...objectOmit(
|
||||
this.props,
|
||||
"size",
|
||||
"offset",
|
||||
"children",
|
||||
"className",
|
||||
"nogrow",
|
||||
"tabletSize",
|
||||
"tabletoffset",
|
||||
"tabletGrow",
|
||||
"mobileSize",
|
||||
"mobileoffset",
|
||||
"mobileGrow"
|
||||
)} className={buildClassName(
|
||||
css.col,
|
||||
|
||||
// Normal
|
||||
|
Loading…
x
Reference in New Issue
Block a user