styled-bootstrap-grid
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -7,4 +7,3 @@ 'use strict'; | ||
var _templateObject = _taggedTemplateLiteral(['\n @media (max-width: ', 'px) {\n ', '\n }\n '], ['\n @media (max-width: ', 'px) {\n ', '\n }\n ']), | ||
_templateObject2 = _taggedTemplateLiteral(['\n @media (min-width: ', 'px) {\n ', '\n }\n '], ['\n @media (min-width: ', 'px) {\n ', '\n }\n ']); | ||
var _templateObject = _taggedTemplateLiteral(['\n @media (min-width: ', 'px) {\n ', '\n }\n '], ['\n @media (min-width: ', 'px) {\n ', '\n }\n ']); | ||
@@ -24,15 +23,10 @@ var _styledComponents = require('styled-components'); | ||
sm: 576, | ||
col: true | ||
col: 0, | ||
all: 0 | ||
}; | ||
var media = Object.keys(breakpoints).reduce(function (accumulator, label) { | ||
if (label === 'col') { | ||
accumulator[label] = function () { | ||
return (0, _styledComponents.css)(_templateObject, breakpoints.sm - 1, _styledComponents.css.apply(undefined, arguments)); | ||
}; | ||
} else { | ||
accumulator[label] = function () { | ||
return (0, _styledComponents.css)(_templateObject2, breakpoints[label], _styledComponents.css.apply(undefined, arguments)); | ||
}; | ||
} | ||
accumulator[label] = function () { | ||
return (0, _styledComponents.css)(_templateObject, breakpoints[label], _styledComponents.css.apply(undefined, arguments)); | ||
}; | ||
return accumulator; | ||
@@ -39,0 +33,0 @@ }, {}); |
{ | ||
"name": "styled-bootstrap-grid", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "bootstrap grid system using styled components", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -198,7 +198,7 @@ # styled-bootstrap-grid | ||
| - | - | - | | ||
| col | *phone* | `@media (max-width: 766px) { /* */ }` | ||
| sm | *phone* | `@media (min-width: 767px) { /* */ }` | ||
| md | *tablet* | `@media (min-width: 768px) { /* */ }` | ||
| lg | *desktop* | `@media (min-width: 992px) { /* */ }` | ||
| xl | *giant* | `@media (min-width: 1200px) { /* */ }` | ||
| col | *all* | all sizes: `@media (min-width: 0px) { /* */ }` | | ||
| sm | *phone* | `@media (min-width: 767px) { /* */ }` | | ||
| md | *tablet* | `@media (min-width: 768px) { /* */ }` | | ||
| lg | *desktop* | `@media (min-width: 992px) { /* */ }` | | ||
| xl | *giant* | `@media (min-width: 1200px) { /* */ }` | | ||
@@ -205,0 +205,0 @@ ## Props definition |
@@ -12,19 +12,12 @@ import { css } from 'styled-components'; | ||
sm: 576, | ||
col: true, | ||
col: 0, | ||
all: 0, | ||
}; | ||
const media = Object.keys(breakpoints).reduce((accumulator, label) => { | ||
if (label === 'col') { | ||
accumulator[label] = (...args) => css` | ||
@media (max-width: ${breakpoints.sm - 1}px) { | ||
${css(...args)} | ||
} | ||
`; | ||
} else { | ||
accumulator[label] = (...args) => css` | ||
@media (min-width: ${breakpoints[label]}px) { | ||
${css(...args)} | ||
} | ||
`; | ||
} | ||
accumulator[label] = (...args) => css` | ||
@media (min-width: ${breakpoints[label]}px) { | ||
${css(...args)} | ||
} | ||
`; | ||
return accumulator; | ||
@@ -31,0 +24,0 @@ }, {}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
465845
2116