File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,7 +31,9 @@ export default class LayoutsPage extends React.Component {
3131 < h4 > Row Properties</ h4 >
3232 < pre >
3333 < PrismCode className = "language-jsx" >
34- { 'Row.propTypes = {}' }
34+ { 'Row.propTypes = {
35+ noGutters : PropTypes . bool
36+ } '}
3537 </ PrismCode >
3638 </ pre >
3739 < h4 > Col Properties</ h4 >
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { mapToCssModules } from './utils';
44
55const propTypes = {
66 tag : PropTypes . oneOfType ( [ PropTypes . func , PropTypes . string ] ) ,
7+ noGutters : PropTypes . bool ,
78 className : PropTypes . string ,
89 cssModule : PropTypes . object ,
910} ;
@@ -16,12 +17,14 @@ const Row = (props) => {
1617 const {
1718 className,
1819 cssModule,
20+ noGutters,
1921 tag : Tag ,
20- ...attributes
22+ ...attributes ,
2123 } = props ;
2224
2325 const classes = mapToCssModules ( classNames (
2426 className ,
27+ noGutters ? 'no-gutters' : null ,
2528 'row'
2629 ) , cssModule ) ;
2730
Original file line number Diff line number Diff line change @@ -21,4 +21,11 @@ describe('Row', () => {
2121 expect ( wrapper . hasClass ( 'extra' ) ) . toBe ( true ) ;
2222 expect ( wrapper . hasClass ( 'row' ) ) . toBe ( true ) ;
2323 } ) ;
24+
25+ it ( 'show render noGutters classes' , ( ) => {
26+ const wrapper = shallow ( < Row noGutters /> ) ;
27+
28+ expect ( wrapper . hasClass ( 'no-gutters' ) ) . toBe ( true ) ;
29+ expect ( wrapper . hasClass ( 'row' ) ) . toBe ( true ) ;
30+ } ) ;
2431} ) ;
You can’t perform that action at this time.
0 commit comments