@jouwomgeving/ui-button
Advanced tools
Comparing version
@@ -87,3 +87,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
throw new Error("Module build failed: Error: \"extract-text-webpack-plugin\" loader is used without the corresponding plugin, refer to https://github.com/webpack/extract-text-webpack-plugin for the usage example\n at Object.module.exports.pitch (/Users/jvanleeuwen/Projects/dictator/node_modules/extract-text-webpack-plugin/loader.js:26:9)"); | ||
throw new Error("Module build failed: Error: \"extract-text-webpack-plugin\" loader is used without the corresponding plugin, refer to https://github.com/webpack/extract-text-webpack-plugin for the usage example\n at Object.module.exports.pitch (/Users/jbovenschen/JouwOmgeving/dev.vm2/jo-interface/node_modules/extract-text-webpack-plugin/loader.js:27:9)"); | ||
@@ -201,7 +201,7 @@ /***/ }, | ||
var Button = function Button(_ref) { | ||
var type = _ref.type; | ||
var children = _ref.children; | ||
var disabled = _ref.disabled; | ||
var onClick = _ref.onClick; | ||
var submit = _ref.submit; | ||
var type = _ref.type, | ||
children = _ref.children, | ||
disabled = _ref.disabled, | ||
onClick = _ref.onClick, | ||
submit = _ref.submit; | ||
return _react2.default.createElement( | ||
@@ -220,3 +220,3 @@ 'button', | ||
Button.propTypes = { | ||
type: _react.PropTypes.oneOf(['primary', 'secondary', 'success', 'error']).isRequired, | ||
type: _react.PropTypes.oneOf(['primary', 'secondary', 'approve', 'decline']).isRequired, | ||
children: _react.PropTypes.any, | ||
@@ -313,4 +313,4 @@ label: _react.PropTypes.string, | ||
function Group(_ref) { | ||
var children = _ref.children; | ||
var direction = _ref.direction; | ||
var children = _ref.children, | ||
direction = _ref.direction; | ||
@@ -354,14 +354,15 @@ return _react2.default.createElement( | ||
const styles = { | ||
'Icon': 'styles__Icon___1AoIC', | ||
'FontAwesome': 'styles__FontAwesome___2qE0j styles__Icon___1AoIC', | ||
'EmojiOne': 'styles__EmojiOne___1O8Uz styles__Icon___1AoIC', | ||
'SmashIcon': 'styles__SmashIcon___2EIyE styles__Icon___1AoIC', | ||
'Label': 'styles__Label___1x7t5', | ||
'left': 'styles__left___1Hxlz', | ||
'Label-content': 'styles__Label-content___3zclq', | ||
'right': 'styles__right___2Jy5H', | ||
'center': 'styles__center___Sc0qq', | ||
'bottom': 'styles__bottom___bQQRE', | ||
'top': 'styles__top___1gFk9', | ||
'Label-icon': 'styles__Label-icon___3viAW' | ||
'Icon': 'Icon___8b8faa44bfd1e9c34fb3e79dbbc96264', | ||
'FontAwesome': 'FontAwesome___801f65c0d5abff4c0804a822db04a09a Icon___8b8faa44bfd1e9c34fb3e79dbbc96264', | ||
'JOIcon': 'JOIcon___4895433daf52965e8045c458a605a4ef Icon___8b8faa44bfd1e9c34fb3e79dbbc96264', | ||
'EmojiOne': 'EmojiOne___e7f2c8d7751346ef09b18098ea882372 Icon___8b8faa44bfd1e9c34fb3e79dbbc96264', | ||
'SmashIcon': 'SmashIcon___e5d20307fffe6ccf13feedfc002ab2a8 Icon___8b8faa44bfd1e9c34fb3e79dbbc96264', | ||
'Label': 'Label___84e83318da2eecf957b7ba0d4fd11d61', | ||
'left': 'left___93e9eac96d3ba5930def1fd3c358856b', | ||
'Label-content': 'Label-content___3fa83d95100a99b71ac9a7e7935631e3', | ||
'right': 'right___63e4d5620a5c5fe6af9aea64e75a88ad', | ||
'center': 'center___a9796ca931d45d43862ee4c59a063036', | ||
'bottom': 'bottom___17b3b2cce444b4df7d46b785684dd30b', | ||
'top': 'top___5c2094aed29f3777662657b26942a550', | ||
'Label-icon': 'Label-icon___beafeb39f870981a3c6e72f5b54e4adf' | ||
}; | ||
@@ -368,0 +369,0 @@ class FaClose extends __WEBPACK_IMPORTED_MODULE_0_react__["Component"] { |
@@ -5,14 +5,14 @@ import React, { PropTypes } from 'react'; | ||
const styles = { | ||
'Button': 'styles__Button___25D3l', | ||
'Button-content': 'styles__Button-content___asVnw', | ||
'disabled': 'styles__disabled___3PoLx', | ||
'Button-prefix': 'styles__Button-prefix___2euxs', | ||
'Button-suffix': 'styles__Button-suffix___2gXk2', | ||
'primary': 'styles__primary___2056t', | ||
'secondary': 'styles__secondary___2Z3NI', | ||
'Group': 'styles__Group___3t-Hw', | ||
'Group-item': 'styles__Group-item___xJZUV', | ||
'horizontal': 'styles__horizontal___1pcjx', | ||
'vertical': 'styles__vertical___3Brjx', | ||
'Close': 'styles__Close___3VI-x' | ||
'Button': 'Button___558dcbc7545a2206c3c307c07b359c85', | ||
'primary': 'primary___861ef6aa467bd14af672f36b7a671480', | ||
'secondary': 'secondary___1df3c5d2993b93114e55c098011b0fbd', | ||
'approve': 'approve___9ba315d31f9b9a0df0df90124fe3e266', | ||
'decline': 'decline___124063290c2091ed793f0cdb05c73c4c', | ||
'disabled': 'disabled___401ccd0cadad96164044b12f7bf862f3', | ||
'Group': 'Group___2d8a85ab733625ec128d780729b8fadd', | ||
'Group-item': 'Group-item___95b75bc8bf5a24f7e8490a6939deb721', | ||
'horizontal': 'horizontal___891bda1ca193264cfdc69cb962383159', | ||
'vertical': 'vertical___5c7c9ae9f35e8b90de67cc3779386de5', | ||
'Close': 'Close___0cbb63c00333b0b3db6b74db4de8b3f9', | ||
'Action': 'Action___45e3421b27df789553a20d8f67eef3a6' | ||
}; | ||
@@ -34,3 +34,3 @@ | ||
Button.propTypes = { | ||
type: PropTypes.oneOf(['primary', 'secondary', 'success', 'error']).isRequired, | ||
type: PropTypes.oneOf(['primary', 'secondary', 'approve', 'decline']).isRequired, | ||
children: PropTypes.any, | ||
@@ -37,0 +37,0 @@ label: PropTypes.string, |
@@ -7,14 +7,14 @@ import React, { PropTypes } from 'react'; | ||
const styles = { | ||
'Button': 'styles__Button___25D3l', | ||
'Button-content': 'styles__Button-content___asVnw', | ||
'disabled': 'styles__disabled___3PoLx', | ||
'Button-prefix': 'styles__Button-prefix___2euxs', | ||
'Button-suffix': 'styles__Button-suffix___2gXk2', | ||
'primary': 'styles__primary___2056t', | ||
'secondary': 'styles__secondary___2Z3NI', | ||
'Group': 'styles__Group___3t-Hw', | ||
'Group-item': 'styles__Group-item___xJZUV', | ||
'horizontal': 'styles__horizontal___1pcjx', | ||
'vertical': 'styles__vertical___3Brjx', | ||
'Close': 'styles__Close___3VI-x' | ||
'Button': 'Button___558dcbc7545a2206c3c307c07b359c85', | ||
'primary': 'primary___861ef6aa467bd14af672f36b7a671480', | ||
'secondary': 'secondary___1df3c5d2993b93114e55c098011b0fbd', | ||
'approve': 'approve___9ba315d31f9b9a0df0df90124fe3e266', | ||
'decline': 'decline___124063290c2091ed793f0cdb05c73c4c', | ||
'disabled': 'disabled___401ccd0cadad96164044b12f7bf862f3', | ||
'Group': 'Group___2d8a85ab733625ec128d780729b8fadd', | ||
'Group-item': 'Group-item___95b75bc8bf5a24f7e8490a6939deb721', | ||
'horizontal': 'horizontal___891bda1ca193264cfdc69cb962383159', | ||
'vertical': 'vertical___5c7c9ae9f35e8b90de67cc3779386de5', | ||
'Close': 'Close___0cbb63c00333b0b3db6b74db4de8b3f9', | ||
'Action': 'Action___45e3421b27df789553a20d8f67eef3a6' | ||
}; | ||
@@ -21,0 +21,0 @@ |
@@ -6,14 +6,14 @@ import React, { PropTypes } from 'react'; | ||
const styles = { | ||
'Button': 'styles__Button___25D3l', | ||
'Button-content': 'styles__Button-content___asVnw', | ||
'disabled': 'styles__disabled___3PoLx', | ||
'Button-prefix': 'styles__Button-prefix___2euxs', | ||
'Button-suffix': 'styles__Button-suffix___2gXk2', | ||
'primary': 'styles__primary___2056t', | ||
'secondary': 'styles__secondary___2Z3NI', | ||
'Group': 'styles__Group___3t-Hw', | ||
'Group-item': 'styles__Group-item___xJZUV', | ||
'horizontal': 'styles__horizontal___1pcjx', | ||
'vertical': 'styles__vertical___3Brjx', | ||
'Close': 'styles__Close___3VI-x' | ||
'Button': 'Button___558dcbc7545a2206c3c307c07b359c85', | ||
'primary': 'primary___861ef6aa467bd14af672f36b7a671480', | ||
'secondary': 'secondary___1df3c5d2993b93114e55c098011b0fbd', | ||
'approve': 'approve___9ba315d31f9b9a0df0df90124fe3e266', | ||
'decline': 'decline___124063290c2091ed793f0cdb05c73c4c', | ||
'disabled': 'disabled___401ccd0cadad96164044b12f7bf862f3', | ||
'Group': 'Group___2d8a85ab733625ec128d780729b8fadd', | ||
'Group-item': 'Group-item___95b75bc8bf5a24f7e8490a6939deb721', | ||
'horizontal': 'horizontal___891bda1ca193264cfdc69cb962383159', | ||
'vertical': 'vertical___5c7c9ae9f35e8b90de67cc3779386de5', | ||
'Close': 'Close___0cbb63c00333b0b3db6b74db4de8b3f9', | ||
'Action': 'Action___45e3421b27df789553a20d8f67eef3a6' | ||
}; | ||
@@ -20,0 +20,0 @@ |
@@ -18,14 +18,14 @@ 'use strict'; | ||
var styles = { | ||
'Button': 'styles__Button___25D3l', | ||
'Button-content': 'styles__Button-content___asVnw', | ||
'disabled': 'styles__disabled___3PoLx', | ||
'Button-prefix': 'styles__Button-prefix___2euxs', | ||
'Button-suffix': 'styles__Button-suffix___2gXk2', | ||
'primary': 'styles__primary___2056t', | ||
'secondary': 'styles__secondary___2Z3NI', | ||
'Group': 'styles__Group___3t-Hw', | ||
'Group-item': 'styles__Group-item___xJZUV', | ||
'horizontal': 'styles__horizontal___1pcjx', | ||
'vertical': 'styles__vertical___3Brjx', | ||
'Close': 'styles__Close___3VI-x' | ||
'Button': 'Button___558dcbc7545a2206c3c307c07b359c85', | ||
'primary': 'primary___861ef6aa467bd14af672f36b7a671480', | ||
'secondary': 'secondary___1df3c5d2993b93114e55c098011b0fbd', | ||
'approve': 'approve___9ba315d31f9b9a0df0df90124fe3e266', | ||
'decline': 'decline___124063290c2091ed793f0cdb05c73c4c', | ||
'disabled': 'disabled___401ccd0cadad96164044b12f7bf862f3', | ||
'Group': 'Group___2d8a85ab733625ec128d780729b8fadd', | ||
'Group-item': 'Group-item___95b75bc8bf5a24f7e8490a6939deb721', | ||
'horizontal': 'horizontal___891bda1ca193264cfdc69cb962383159', | ||
'vertical': 'vertical___5c7c9ae9f35e8b90de67cc3779386de5', | ||
'Close': 'Close___0cbb63c00333b0b3db6b74db4de8b3f9', | ||
'Action': 'Action___45e3421b27df789553a20d8f67eef3a6' | ||
}; | ||
@@ -36,7 +36,7 @@ | ||
var Button = function Button(_ref) { | ||
var type = _ref.type; | ||
var children = _ref.children; | ||
var disabled = _ref.disabled; | ||
var onClick = _ref.onClick; | ||
var submit = _ref.submit; | ||
var type = _ref.type, | ||
children = _ref.children, | ||
disabled = _ref.disabled, | ||
onClick = _ref.onClick, | ||
submit = _ref.submit; | ||
return _react2.default.createElement( | ||
@@ -55,3 +55,3 @@ 'button', | ||
Button.propTypes = { | ||
type: _react.PropTypes.oneOf(['primary', 'secondary', 'success', 'error']).isRequired, | ||
type: _react.PropTypes.oneOf(['primary', 'secondary', 'approve', 'decline']).isRequired, | ||
children: _react.PropTypes.any, | ||
@@ -58,0 +58,0 @@ label: _react.PropTypes.string, |
@@ -22,14 +22,14 @@ 'use strict'; | ||
var styles = { | ||
'Button': 'styles__Button___25D3l', | ||
'Button-content': 'styles__Button-content___asVnw', | ||
'disabled': 'styles__disabled___3PoLx', | ||
'Button-prefix': 'styles__Button-prefix___2euxs', | ||
'Button-suffix': 'styles__Button-suffix___2gXk2', | ||
'primary': 'styles__primary___2056t', | ||
'secondary': 'styles__secondary___2Z3NI', | ||
'Group': 'styles__Group___3t-Hw', | ||
'Group-item': 'styles__Group-item___xJZUV', | ||
'horizontal': 'styles__horizontal___1pcjx', | ||
'vertical': 'styles__vertical___3Brjx', | ||
'Close': 'styles__Close___3VI-x' | ||
'Button': 'Button___558dcbc7545a2206c3c307c07b359c85', | ||
'primary': 'primary___861ef6aa467bd14af672f36b7a671480', | ||
'secondary': 'secondary___1df3c5d2993b93114e55c098011b0fbd', | ||
'approve': 'approve___9ba315d31f9b9a0df0df90124fe3e266', | ||
'decline': 'decline___124063290c2091ed793f0cdb05c73c4c', | ||
'disabled': 'disabled___401ccd0cadad96164044b12f7bf862f3', | ||
'Group': 'Group___2d8a85ab733625ec128d780729b8fadd', | ||
'Group-item': 'Group-item___95b75bc8bf5a24f7e8490a6939deb721', | ||
'horizontal': 'horizontal___891bda1ca193264cfdc69cb962383159', | ||
'vertical': 'vertical___5c7c9ae9f35e8b90de67cc3779386de5', | ||
'Close': 'Close___0cbb63c00333b0b3db6b74db4de8b3f9', | ||
'Action': 'Action___45e3421b27df789553a20d8f67eef3a6' | ||
}; | ||
@@ -36,0 +36,0 @@ |
@@ -18,14 +18,14 @@ 'use strict'; | ||
var styles = { | ||
'Button': 'styles__Button___25D3l', | ||
'Button-content': 'styles__Button-content___asVnw', | ||
'disabled': 'styles__disabled___3PoLx', | ||
'Button-prefix': 'styles__Button-prefix___2euxs', | ||
'Button-suffix': 'styles__Button-suffix___2gXk2', | ||
'primary': 'styles__primary___2056t', | ||
'secondary': 'styles__secondary___2Z3NI', | ||
'Group': 'styles__Group___3t-Hw', | ||
'Group-item': 'styles__Group-item___xJZUV', | ||
'horizontal': 'styles__horizontal___1pcjx', | ||
'vertical': 'styles__vertical___3Brjx', | ||
'Close': 'styles__Close___3VI-x' | ||
'Button': 'Button___558dcbc7545a2206c3c307c07b359c85', | ||
'primary': 'primary___861ef6aa467bd14af672f36b7a671480', | ||
'secondary': 'secondary___1df3c5d2993b93114e55c098011b0fbd', | ||
'approve': 'approve___9ba315d31f9b9a0df0df90124fe3e266', | ||
'decline': 'decline___124063290c2091ed793f0cdb05c73c4c', | ||
'disabled': 'disabled___401ccd0cadad96164044b12f7bf862f3', | ||
'Group': 'Group___2d8a85ab733625ec128d780729b8fadd', | ||
'Group-item': 'Group-item___95b75bc8bf5a24f7e8490a6939deb721', | ||
'horizontal': 'horizontal___891bda1ca193264cfdc69cb962383159', | ||
'vertical': 'vertical___5c7c9ae9f35e8b90de67cc3779386de5', | ||
'Close': 'Close___0cbb63c00333b0b3db6b74db4de8b3f9', | ||
'Action': 'Action___45e3421b27df789553a20d8f67eef3a6' | ||
}; | ||
@@ -36,4 +36,4 @@ | ||
function Group(_ref) { | ||
var children = _ref.children; | ||
var direction = _ref.direction; | ||
var children = _ref.children, | ||
direction = _ref.direction; | ||
@@ -40,0 +40,0 @@ return _react2.default.createElement( |
{ | ||
"name": "@jouwomgeving/ui-button", | ||
"version": "0.0.2-alpha.3f2ac2a2", | ||
"version": "0.0.2-alpha.402245b2", | ||
"author": "Jouw Omgeving", | ||
@@ -23,3 +23,3 @@ "license": "UNLICENSED", | ||
"devDependencies": { | ||
"@jouwomgeving/ui-icon": "^0.0.1-alpha.3f2ac2a2" | ||
"@jouwomgeving/ui-icon": "^0.0.1-alpha.402245b2" | ||
}, | ||
@@ -26,0 +26,0 @@ "dependencies": { |
@@ -20,3 +20,3 @@ import React, { PropTypes } from 'react'; | ||
Button.propTypes = { | ||
type: PropTypes.oneOf(['primary', 'secondary', 'success', 'error']).isRequired, | ||
type: PropTypes.oneOf(['primary', 'secondary', 'approve', 'decline']).isRequired, | ||
children: PropTypes.any, | ||
@@ -23,0 +23,0 @@ label: PropTypes.string, |
import React from 'react'; | ||
import { storiesOf, action } from '@kadira/storybook'; | ||
import { withKnobs, select, boolean } from '@kadira/storybook-addon-knobs'; | ||
import * as Button from '@jouwomgeving/ui-button'; | ||
import * as Icon from '@jouwomgeving/ui-icon'; | ||
import Button from '@jouwomgeving/ui-button'; | ||
import Text from '@jouwomgeving/ui-typography/Text'; | ||
const settings = { | ||
source: true, | ||
inline: false, | ||
propTables: [Button.default], | ||
header: false, | ||
const types = { | ||
primary: 'primary', | ||
secondary: 'secondary', | ||
approve: 'approve', | ||
decline: 'decline', | ||
}; | ||
function randomIcon(icons) { | ||
const keys = Object.keys(icons); | ||
return icons[keys[keys.length * Math.random() << 0]]; | ||
} | ||
storiesOf('<Button.default />', module) | ||
.addWithInfo('Default', '', | ||
.addDecorator(withKnobs) | ||
.add( | ||
'Default', | ||
() => ( | ||
<Button.default | ||
label="Primary" | ||
type="primary" | ||
<Button | ||
type={select('Type', types, types.primary)} | ||
onClick={action('Button')} | ||
/> | ||
), settings | ||
) | ||
.addWithInfo('Type: Secondary', '', | ||
() => ( | ||
<Button.default | ||
label="Secondary" | ||
type="secondary" | ||
onClick={action('Button Secondary')} | ||
/> | ||
), settings | ||
) | ||
.addWithInfo('Disabled: true', '', | ||
() => ( | ||
<Button.default | ||
label="Disabled" | ||
disabled | ||
/> | ||
), settings | ||
) | ||
.addWithInfo('Type: Secondary, Disabled: true', '', | ||
() => ( | ||
<Button.default | ||
label="Secondary Disabled" | ||
disabled | ||
type="secondary" | ||
/> | ||
), settings | ||
) | ||
.addWithInfo('Prefix: Icon', '', | ||
() => { | ||
const SelectedIcon = randomIcon(Icon.FontAwesome); | ||
disabled={boolean('Disabled', false)} | ||
return ( | ||
<Button.default | ||
label="Prefix" | ||
prefix={( | ||
<SelectedIcon | ||
color="currentColor" | ||
size={18} | ||
/> | ||
)} | ||
/> | ||
); | ||
}, settings | ||
) | ||
.addWithInfo('Suffix: Icon', '', | ||
() => { | ||
const SelectedIcon = randomIcon(Icon.FontAwesome); | ||
return ( | ||
<Button.default | ||
label="Suffix" | ||
suffix={( | ||
<SelectedIcon | ||
size={18} | ||
color="currentColor" | ||
/> | ||
)} | ||
/> | ||
); | ||
}, settings | ||
> | ||
<Text color="inherit">Button content</Text> | ||
</Button> | ||
) | ||
); |
@@ -6,11 +6,5 @@ import React from 'react'; | ||
const settings = { | ||
source: true, | ||
inline: false, | ||
propTables: [Button.Close], | ||
header: true, | ||
}; | ||
storiesOf('<Button.Close />', module) | ||
.addWithInfo('Default', '', | ||
.add( | ||
'Default', | ||
() => ( | ||
@@ -20,3 +14,3 @@ <Button.Close | ||
/> | ||
), settings | ||
) | ||
); |
@@ -6,11 +6,5 @@ import React from 'react'; | ||
const settings = { | ||
source: true, | ||
inline: false, | ||
propTables: [Button.Group], | ||
header: false, | ||
}; | ||
storiesOf('<Button.Group />', module) | ||
.addWithInfo('Horizontal', '', | ||
.add( | ||
'Horizontal', | ||
() => ( | ||
@@ -24,5 +18,6 @@ <Button.Group direction="horizontal"> | ||
</Button.Group> | ||
), settings | ||
) | ||
) | ||
.addWithInfo('Vertical', '', | ||
.add( | ||
'Vertical', | ||
() => ( | ||
@@ -36,3 +31,3 @@ <Button.Group direction="vertical"> | ||
</Button.Group> | ||
), settings | ||
) | ||
); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
42103
2.17%24
9.09%0
-100%1177
-4.7%