grid-styled
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports.Quarter = exports.Third = exports.Half = undefined; | ||
exports.GoldenB = exports.GoldenA = exports.Quarter = exports.Third = exports.Half = undefined; | ||
@@ -72,2 +72,13 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var φ = (1 + Math.sqrt(5)) / 2; | ||
var ga = φ - 1; | ||
var gb = 1 - ga; | ||
var GoldenA = exports.GoldenA = function GoldenA(props) { | ||
return _react2.default.createElement(Grid, _extends({}, props, { sm: ga })); | ||
}; | ||
var GoldenB = exports.GoldenB = function GoldenB(props) { | ||
return _react2.default.createElement(Grid, _extends({}, props, { sm: gb })); | ||
}; | ||
exports.default = Grid; |
{ | ||
"name": "grid-styled", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Responsive React grid system built with styled-components", | ||
@@ -10,2 +10,3 @@ "main": "dist/Grid.js", | ||
"build": "NODE_ENV=production webpack -p", | ||
"lint": "stylelint ./src/**/*.js", | ||
"test": "ava" | ||
@@ -25,4 +26,4 @@ }, | ||
"classnames": "^2.2.5", | ||
"enzyme": "^2.4.1", | ||
"html-webpack-plugin": "^2.22.0", | ||
"enzyme": "^2.5.1", | ||
"html-webpack-plugin": "^2.24.0", | ||
"react": "^15.3.2", | ||
@@ -33,2 +34,5 @@ "react-addons-test-utils": "^15.3.2", | ||
"recompose": "^0.20.2", | ||
"stylelint": "^7.5.0", | ||
"stylelint-config-standard": "^14.0.0", | ||
"stylelint-processor-styled-components": "0.0.3", | ||
"webpack": "^1.13.2", | ||
@@ -38,3 +42,3 @@ "webpack-dev-server": "^1.16.2" | ||
"dependencies": { | ||
"styled-components": "^1.0.0" | ||
"styled-components": "^1.0.8" | ||
}, | ||
@@ -41,0 +45,0 @@ "ava": { |
@@ -96,6 +96,8 @@ | ||
- `Half` - Grid component that goes half width at the small breakpoint | ||
- `Third` - Grid component that goes one-third width at the small breakpoint | ||
- `Quarter` - Grid component that goes one-quart width at the medium breakpoint | ||
- `Half` - Grid component that spans oes half width at the small breakpoint | ||
- `Third` - Grid component that spans oes one-third width at the small breakpoint | ||
- `Quarter` - Grid component that spans oes one-quarter width at the medium breakpoint | ||
- `GoldenA` - Grid component that spans the golden ratio a width at the medium breakpoint (where a / b == φ) | ||
- `GoldenB` - Grid component that spans the golden ratio b width at the medium breakpoint | ||
MIT License |
@@ -46,3 +46,10 @@ | ||
const φ = (1 + Math.sqrt(5)) / 2 | ||
const ga = φ - 1 | ||
const gb = 1 - ga | ||
export const GoldenA = props => <Grid {...props} sm={ga} /> | ||
export const GoldenB = props => <Grid {...props} sm={gb} /> | ||
export default Grid | ||
9932
9
169
103
20
Updatedstyled-components@^1.0.8