teamleader-ui
Advanced tools
Comparing version 0.0.30-alpha to 0.0.31-alpha
@@ -30,3 +30,6 @@ import React, { Component } from 'react'; | ||
}), | ||
value: PropTypes.string, | ||
value: PropTypes.oneOfType([ | ||
PropTypes.string, | ||
PropTypes.bool, | ||
]), | ||
}; | ||
@@ -33,0 +36,0 @@ |
@@ -14,3 +14,6 @@ import React, { Component } from 'react'; | ||
onChange: PropTypes.func, | ||
value: PropTypes.string, | ||
value: PropTypes.oneOfType([ | ||
PropTypes.string, | ||
PropTypes.bool, | ||
]), | ||
}; | ||
@@ -17,0 +20,0 @@ |
@@ -139,3 +139,3 @@ 'use strict'; | ||
fileName: _jsxFileName, | ||
lineNumber: 78 | ||
lineNumber: 81 | ||
} | ||
@@ -156,3 +156,3 @@ }, | ||
fileName: _jsxFileName, | ||
lineNumber: 84 | ||
lineNumber: 87 | ||
} | ||
@@ -162,3 +162,3 @@ })), | ||
fileName: _jsxFileName, | ||
lineNumber: 97 | ||
lineNumber: 100 | ||
} | ||
@@ -170,3 +170,3 @@ }), | ||
fileName: _jsxFileName, | ||
lineNumber: 98 | ||
lineNumber: 101 | ||
} | ||
@@ -201,3 +201,3 @@ }, | ||
}), | ||
value: _propTypes2.default.string | ||
value: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.bool]) | ||
}; | ||
@@ -204,0 +204,0 @@ RadioButton.defaultProps = { |
@@ -80,3 +80,3 @@ 'use strict'; | ||
fileName: _jsxFileName, | ||
lineNumber: 36 | ||
lineNumber: 39 | ||
} | ||
@@ -104,3 +104,3 @@ }, | ||
onChange: _propTypes2.default.func, | ||
value: _propTypes2.default.string | ||
value: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.bool]) | ||
}; | ||
@@ -107,0 +107,0 @@ RadioGroup.defaultProps = { |
{ | ||
"name": "teamleader-ui", | ||
"description": "Teamleader UI library", | ||
"version": "0.0.30-alpha", | ||
"version": "0.0.31-alpha", | ||
"author": "Teamleader <development@teamleader.eu>", | ||
@@ -6,0 +6,0 @@ "betterScripts": { |
@@ -6,10 +6,16 @@ import React from 'react'; | ||
state = { | ||
value: 'vvendetta', | ||
stringValue: 'vvendetta', | ||
booleanValue: false, | ||
}; | ||
handleChange = (value) => { | ||
console.log('Changed!', { comic: value }); | ||
this.setState({ value }); | ||
handleStringChange = (value) => { | ||
console.log('Changed the string value!', { stringValue: value }); | ||
this.setState({ stringValue: value }); | ||
}; | ||
handleBooleanChange = (value) => { | ||
console.log('Changed the boolean value!', { booleanValue: value }); | ||
this.setState({ booleanValue: value }); | ||
}; | ||
handleFocus = () => { | ||
@@ -33,4 +39,4 @@ console.log('Focused V for a Vendetta'); | ||
<h3>Preview</h3> | ||
<RadioGroup name="comic" value={this.state.value} onChange={this.handleChange}> | ||
<h4>String example</h4> | ||
<RadioGroup name="stringValue" value={this.state.stringValue} onChange={this.handleStringChange}> | ||
<RadioButton label="The Walking Dead" value="thewalkingdead" /> | ||
@@ -41,2 +47,8 @@ <RadioButton label="From Hell" value="fromhell" disabled /> | ||
</RadioGroup> | ||
<h4>Boolean example</h4> | ||
<RadioGroup name="booleanValue" value={this.state.booleanValue} onChange={this.handleBooleanChange}> | ||
<RadioButton label="True" value /> | ||
<RadioButton label="False" value={false} /> | ||
</RadioGroup> | ||
</div> | ||
@@ -43,0 +55,0 @@ </div> |
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
394517
9998