Comparing version 0.5.3 to 0.6.0
@@ -1,3 +0,6 @@ | ||
import { configure } from '@kadira/storybook'; | ||
import { configure, setAddon } from '@kadira/storybook'; | ||
import infoAddon from '@kadira/react-storybook-addon-info'; | ||
setAddon(infoAddon); | ||
function loadStories() { | ||
@@ -4,0 +7,0 @@ require('./stories'); |
@@ -1,3 +0,4 @@ | ||
export { default as FlexLayout } from './flexLayout'; | ||
export { default as SpacedLayout } from './spacedLayout'; | ||
export { default as Examples } from './examples'; | ||
export { default as FlexRow } from './flexRow'; | ||
export { default as FlexColumn } from './flexColumn'; | ||
export { default as SpacedColumn } from './spacedColumn'; | ||
export { default as SpacedRow } from './spacedRow'; |
@@ -7,20 +7,24 @@ 'use strict'; | ||
var _FlexLayout = require('./FlexLayout'); | ||
var _Flex = require('./Flex'); | ||
Object.defineProperty(exports, 'FlexLayout', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_FlexLayout).default; | ||
} | ||
Object.keys(_Flex).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
Object.defineProperty(exports, key, { | ||
enumerable: true, | ||
get: function get() { | ||
return _Flex[key]; | ||
} | ||
}); | ||
}); | ||
var _SpacedLayout = require('./SpacedLayout'); | ||
var _Spaced = require('./Spaced'); | ||
Object.defineProperty(exports, 'SpacedLayout', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_SpacedLayout).default; | ||
} | ||
}); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
Object.keys(_Spaced).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
Object.defineProperty(exports, key, { | ||
enumerable: true, | ||
get: function get() { | ||
return _Spaced[key]; | ||
} | ||
}); | ||
}); |
{ | ||
"name": "layabout", | ||
"version": "0.5.3", | ||
"version": "0.6.0", | ||
"description": "Simple layout components for React", | ||
@@ -23,5 +23,6 @@ "author": "Dan Mutton", | ||
"demo": "start-storybook -p 9009 -c demo", | ||
"build-storybook": "build-storybook -c demo -o docs" | ||
"build-demo-docs": "build-storybook -c demo -o docs" | ||
}, | ||
"devDependencies": { | ||
"@kadira/react-storybook-addon-info": "^3.3.0", | ||
"@kadira/storybook": "^2.21.0", | ||
@@ -28,0 +29,0 @@ "@kadira/storybook-addon-knobs": "^1.7.1", |
@@ -21,10 +21,10 @@ # Layabout | ||
## Components | ||
### FlexLayout | ||
### FlexRow / FlexColumn | ||
Lays out its children one by one according to a set of relative widths. Overflow continues onto the new row, following the same template. | ||
Lays out its children one by one according to a set of relative sizes. Overflow continues onto the new row/column, following the same template. | ||
`widths` (optional) set of values for sizing widths amongst the total space. | ||
`sizes` (optional) set of values for sizing sizes amongst the total space. | ||
Options: | ||
- `Array` of relative widths. e.g. [2, 3] where the first child will take up 40% and the second 60%. | ||
- `Array` of relative sizes. e.g. [2, 3] where the first child will take up 40% and the second 60%. | ||
@@ -37,3 +37,3 @@ If no value is provided the children will be spaced equally amongst the available space. | ||
- `String` representation of a HTML DOM element. e.g. "section". | ||
- `React component type` can be either class or functional. Note that FlexLayout provides a style prop to the container. It is up to the provided container to pass this to a child element which can render it (eg. a HTML DOM element). | ||
- `React component type` can be either class or functional. Note that FlexRow and FlexColumn provide a style prop to the container. It is up to the provided container to pass this to a child element which can render it (eg. a HTML DOM element). | ||
@@ -55,3 +55,3 @@ If no element is provided a `div` will be rendered as the container. | ||
<FlexLayout | ||
widths={[10, 13, 5]} | ||
sizes={[10, 13, 5]} | ||
gutterSpacing="2px" | ||
@@ -68,3 +68,3 @@ container={Article} | ||
### SpacedLayout | ||
### SpacedColumn / SpacedRow | ||
Lays out its children within the space available with any remaining spacing allocated according to the spacing property. | ||
@@ -111,4 +111,3 @@ | ||
## Future | ||
- allow transposition | ||
- think about whether we could incorporate media queries in some way | ||
- consider what level of historical/cross-browser support we want to provide |
@@ -1,2 +0,2 @@ | ||
export { default as FlexLayout } from './FlexLayout'; | ||
export { default as SpacedLayout } from './SpacedLayout'; | ||
export * from './Flex'; | ||
export * from './Spaced'; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
247448
44
1026
18
109
1