@theme-ui/components
Advanced tools
Comparing version 0.3.0-alpha.2 to 0.3.0-alpha.3
@@ -41,3 +41,3 @@ import css, { get } from '@styled-system/css'; | ||
var countToColumns = function (n) { return Array.isArray(n) ? n.map(countToColumns) : !!n && ("repeat(" + n + ", 1fr)"); }; | ||
var countToColumns = function (n) { return Array.isArray(n) ? n.map(countToColumns) : !!n && (typeof n === 'number' ? ("repeat(" + n + ", 1fr)") : n); }; | ||
@@ -44,0 +44,0 @@ var Grid = React.forwardRef(function (ref$1, ref) { |
@@ -44,3 +44,3 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var countToColumns = function (n) { return Array.isArray(n) ? n.map(countToColumns) : !!n && ("repeat(" + n + ", 1fr)"); }; | ||
var countToColumns = function (n) { return Array.isArray(n) ? n.map(countToColumns) : !!n && (typeof n === 'number' ? ("repeat(" + n + ", 1fr)") : n); }; | ||
@@ -47,0 +47,0 @@ var Grid = React.forwardRef(function (ref$1, ref) { |
@@ -44,3 +44,3 @@ (function (global, factory) { | ||
var countToColumns = function (n) { return Array.isArray(n) ? n.map(countToColumns) : !!n && ("repeat(" + n + ", 1fr)"); }; | ||
var countToColumns = function (n) { return Array.isArray(n) ? n.map(countToColumns) : !!n && (typeof n === 'number' ? ("repeat(" + n + ", 1fr)") : n); }; | ||
@@ -47,0 +47,0 @@ var Grid = React.forwardRef(function (ref$1, ref) { |
{ | ||
"name": "@theme-ui/components", | ||
"version": "0.3.0-alpha.2", | ||
"version": "0.3.0-alpha.3", | ||
"main": "dist/index.js", | ||
@@ -27,3 +27,3 @@ "module": "dist/index.esm.js", | ||
"license": "MIT", | ||
"gitHead": "172fc71b8a6836e7d47b43f6bf709d0f75743906" | ||
"gitHead": "7f6331a5e53cdd6e8425240b235bbfb23d49997e" | ||
} |
@@ -12,3 +12,5 @@ import React from 'react' | ||
const countToColumns = n => | ||
Array.isArray(n) ? n.map(countToColumns) : !!n && `repeat(${n}, 1fr)` | ||
Array.isArray(n) | ||
? n.map(countToColumns) | ||
: !!n && (typeof n === 'number' ? `repeat(${n}, 1fr)` : n) | ||
@@ -15,0 +17,0 @@ export const Grid = React.forwardRef( |
@@ -223,2 +223,7 @@ import React from 'react' | ||
test('renders with mixed columns prop', () => { | ||
const json = renderJSON(<Grid columns="1fr 2fr" />) | ||
expect(json).toMatchSnapshot() | ||
}) | ||
test('renders with responsive columns prop', () => { | ||
@@ -228,2 +233,7 @@ const json = renderJSON(<Grid columns={[2, 3, 4]} />) | ||
}) | ||
test('renders with mixed columns prop', () => { | ||
const json = renderJSON(<Grid columns={[null, '1fr 2fr']} />) | ||
expect(json).toMatchSnapshot() | ||
}) | ||
}) | ||
@@ -310,6 +320,3 @@ | ||
<ThemeProvider theme={theme}> | ||
<Select | ||
mb={3} | ||
value='hello' | ||
/> | ||
<Select mb={3} value="hello" /> | ||
</ThemeProvider> | ||
@@ -316,0 +323,0 @@ ) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
244326
3098