@@ -49,13 +49,6 @@ function generateBreakPoint(breakpoint) {
4949 `
5050}
5151
52- const addProp = ( propName , attribute , transform = x => x ) => props =>
53- typeof props [ propName ] !== 'undefined'
54- ? css `
55- ${ attribute || propName } : ${ transform ( props [ propName ] ) } ;
56- `
57- : null
58-
5952const ColComponent = ( { className, xs, sm, md, lg, xl, ...props } ) => (
6053 < div
6154 className = { classNames (
@@ -74,24 +67,14 @@ const ColComponent = ({ className, xs, sm, md, lg, xl, ...props }) => (
7467 } ,
7568 className ,
7669 ) }
77- { ...omit ( props , [
78- 'theme' ,
79- 'alignItems' ,
80- 'alignContent' ,
81- 'alignSelf' ,
82- 'justifyContent' ,
83- ] ) }
70+ { ...omit ( props , [ 'theme' ] ) }
8471 />
8572)
8673
8774/** @component */
8875const Col = styled ( handleRef ( ColComponent ) ) `
89- display: flex;
90-
91- ${ addProp ( 'alignItems' , 'align-items' ) } ;
92- ${ addProp ( 'alignContent' , 'align-content' ) } ;
93- ${ addProp ( 'alignSelf' , 'align-self' ) } ;
94- ${ addProp ( 'justifyContent' , 'justify-content' ) } ;
76+ padding-left: 15px;
77+ padding-right: 15px;
9578 ${ props => Object . keys ( props . theme . breakPoints ) . map ( generateBreakPoint ) } ;
9679`
9780
@@ -101,10 +84,6 @@ Col.propTypes = {
10184 md : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . string , PropTypes . number ] ) ,
10285 lg : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . string , PropTypes . number ] ) ,
10386 xl : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . string , PropTypes . number ] ) ,
104- alignItems : PropTypes . string ,
105- alignContent : PropTypes . string ,
106- alignSelf : PropTypes . string ,
107- justifyContent : PropTypes . string ,
10887}
10988
11089Col . defaultProps = {
0 commit comments