react-grid-system
Advanced tools
Comparing version 3.0.2 to 3.0.4
@@ -47,3 +47,4 @@ 'use strict'; | ||
paddingRight: theGutterWidth / 2 + 'px', | ||
width: '100%' | ||
width: '100%', | ||
overflow: 'hidden' | ||
}, moreStyle); | ||
@@ -50,0 +51,0 @@ |
@@ -49,3 +49,7 @@ 'use strict'; | ||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Row.__proto__ || Object.getPrototypeOf(Row)).call.apply(_ref, [this].concat(args))), _this), _this.render = function () { | ||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Row.__proto__ || Object.getPrototypeOf(Row)).call.apply(_ref, [this].concat(args))), _this), _this.getChildContext = function () { | ||
return { | ||
gutterWidth: _this.props.nogutter ? 0 : _this.context.gutterWidth | ||
}; | ||
}, _this.render = function () { | ||
var _this$props = _this.props, | ||
@@ -60,3 +64,3 @@ children = _this$props.children, | ||
var theStyle = (0, _style2.default)({ | ||
gutterWidth: _this.context.gutterWidth, | ||
gutterWidth: _this.props.nogutter ? 0 : _this.context.gutterWidth, | ||
align: align, | ||
@@ -91,2 +95,6 @@ grow: grow, | ||
*/ | ||
nogutter: _propTypes2.default.bool, | ||
/** | ||
* Grow this row | ||
*/ | ||
grow: _propTypes2.default.bool, | ||
@@ -104,2 +112,3 @@ /** | ||
align: 'normal', | ||
nogutter: false, | ||
grow: false, | ||
@@ -112,2 +121,5 @@ style: {}, | ||
}; | ||
Row.childContextTypes = { | ||
gutterWidth: _propTypes2.default.number | ||
}; | ||
exports.default = Row; |
{ | ||
"name": "react-grid-system", | ||
"version": "3.0.2", | ||
"version": "3.0.4", | ||
"description": "A no CSS Bootstrap-like responsive grid system for React.", | ||
@@ -9,3 +9,3 @@ "main": "./build/index.js", | ||
"build": "rimraf build && babel src -d build", | ||
"docs": "rimraf docs && styleguidist build", | ||
"docs": "styleguidist build", | ||
"lint": "eslint --ignore-path .gitignore --fix *.js src/**/*.jsx src/**/*.js", | ||
@@ -15,5 +15,7 @@ "test": "echo \"Error: no test specified\" && exit 1", | ||
}, | ||
"types": "./index.d.ts", | ||
"files": [ | ||
"build", | ||
"src" | ||
"src", | ||
"index.d.ts" | ||
], | ||
@@ -65,6 +67,7 @@ "repository": { | ||
"react-dom": "^16.0.0", | ||
"react-styleguidist": "^6.0.28", | ||
"react-styleguidist": "^6.0.29", | ||
"rimraf": "^2.6.2", | ||
"webpack": "^3.6.0" | ||
"webpack": "^3.6.0", | ||
"webpack-blocks": "^1.0.0-rc" | ||
} | ||
} |
@@ -32,2 +32,3 @@ import { defaultGutterWidth, normalizeColumnWidth, screenClasses } from '../../utils'; | ||
width: '100%', | ||
overflow: 'hidden', | ||
...moreStyle, | ||
@@ -34,0 +35,0 @@ }; |
@@ -170,2 +170,13 @@ A no CSS Bootstrap-like responsive grid system for React. | ||
### Example: No gutter | ||
``` | ||
<Container fluid style={{ lineHeight: '32px' }}> | ||
<Row nogutter debug> | ||
<Col md={8} debug>md=8</Col> | ||
<Col md={4} debug>md=4</Col> | ||
</Row> | ||
</Container> | ||
``` | ||
### Example: Row growing | ||
@@ -172,0 +183,0 @@ ``` |
@@ -19,2 +19,6 @@ import React from 'react'; | ||
*/ | ||
nogutter: PropTypes.bool, | ||
/** | ||
* Grow this row | ||
*/ | ||
grow: PropTypes.bool, | ||
@@ -36,2 +40,3 @@ /** | ||
align: 'normal', | ||
nogutter: false, | ||
grow: false, | ||
@@ -46,2 +51,10 @@ style: {}, | ||
static childContextTypes = { | ||
gutterWidth: PropTypes.number, | ||
}; | ||
getChildContext = () => ({ | ||
gutterWidth: this.props.nogutter ? 0 : this.context.gutterWidth, | ||
}); | ||
render = () => { | ||
@@ -52,3 +65,3 @@ const { | ||
const theStyle = getStyle({ | ||
gutterWidth: this.context.gutterWidth, | ||
gutterWidth: this.props.nogutter ? 0 : this.context.gutterWidth, | ||
align, | ||
@@ -55,0 +68,0 @@ grow, |
81235
40
1859
17