diff --git a/package.json b/package.json index 7f572448..b3d235bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nessie-ui", - "version": "10.0.0-alpha.0", + "version": "10.0.0-alpha.1", "description": "dunnhumby media UI component library", "author": "Sociomantic Labs GmbH", "main": "dist", diff --git a/src/Checkbox/index.jsx b/src/Checkbox/index.jsx index d16160c3..b783c695 100644 --- a/src/Checkbox/index.jsx +++ b/src/Checkbox/index.jsx @@ -55,8 +55,15 @@ export default class Checkbox extends React.Component * Label content (string) */ label : PropTypes.string, - onClick : PropTypes.func, - onChange : PropTypes.func, + /** + * change callback prop + */ + onChange : PropTypes.func, + /** + * click callback prop + */ + onClick : PropTypes.func, + }; static defaultProps = @@ -69,6 +76,8 @@ export default class Checkbox extends React.Component isChecked : undefined, isDisabled : false, label : undefined, + onChange : undefined, + onClick : undefined, }; static displayName = 'Checkbox'; diff --git a/src/Grid/README.md b/src/Grid/README.md index 7b4975ef..9420f9c4 100644 --- a/src/Grid/README.md +++ b/src/Grid/README.md @@ -108,8 +108,8 @@ The props accept one of four values: `"S"`, `"M"` (default), `"L"` and `"none"` #### Horizontal alignment -The Grid’s `justify` prop accepts one of four values: `"stretch"`, -`"start"` (default), `"end"` and `"center"`. +The Grid’s `justify` prop accepts one of four values: `"stretch"` (default), +`"start"`, `"end"` and `"center"`. Aligns grid items along the inline (row) axis. This value applies to all grid items inside the container. @@ -117,8 +117,8 @@ items inside the container. #### Vertical alignment -The Grid’s `align` prop accepts one of four values: `"stretch"`, `"start"` -(default), `"center"` and `"end"`. +The Grid’s `align` prop accepts one of four values: `"stretch"` (default), +`"start"`, `"center"` and `"end"`. Aligns grid items along the block (column) axis. This value applies to all grid items inside the container. diff --git a/src/Grid/grid.css b/src/Grid/grid.css index 78cb290e..4b3a6cd8 100644 --- a/src/Grid/grid.css +++ b/src/Grid/grid.css @@ -18,14 +18,7 @@ .default { - display: grid; - max-width: 100%; - - > * - { - overflow: hidden; - min-width: 0; - } + display: grid; } diff --git a/src/Grid/index.jsx b/src/Grid/index.jsx index 517c6c37..7e79280e 100644 --- a/src/Grid/index.jsx +++ b/src/Grid/index.jsx @@ -93,7 +93,7 @@ export default class Grid extends React.Component static defaultProps = { - align : 'start', + align : 'stretch', autoCols : undefined, autoFlow : 'row', autoRows : undefined, @@ -104,7 +104,7 @@ export default class Grid extends React.Component cssMap : undefined, customColumns : undefined, customRows : undefined, - justify : 'start', + justify : 'stretch', rowGap : 'M', rows : undefined, }; @@ -129,8 +129,8 @@ export default class Grid extends React.Component { ...attachEvents( this.props ) } className = { cssMap.main } style = { { - gridAutoColumns : autoCols || '1fr', - gridAutoRows : autoRows || '1fr', + gridAutoColumns : autoCols, + gridAutoRows : autoRows, gridTemplateColumns : customColumns || `repeat( ${columns}, 1fr )`, gridTemplateRows : customRows || `repeat( ${rows}, 1fr )`, diff --git a/src/utils/index.js b/src/utils/index.js index a3254e43..50e5c3de 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -114,11 +114,12 @@ function createEventHandler( func, customizer ) } else if ( type === 'change' ) { - if ( typeof target.checked === 'boolean' ) + const inputType = target.getAttribute( 'type' ); + if ( inputType === 'checkbox' || inputType === 'radio' ) { eventPayload.isChecked = target.checked; } - else if ( target.value ) + else { eventPayload.value = target.value; }