Skip to content

Adding PropType for onCLick property for Checkbox component. #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 16, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/dist/js/checkbox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var Checkbox = React.createClass({
name: React.PropTypes.string.isRequired,
onCheck: React.PropTypes.func,
value: React.PropTypes.string.isRequired,
onClick: React.PropTypes.func
},

mixins: [Classable],
Expand Down
4 changes: 3 additions & 1 deletion docs/dist/js/radio-button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ var RadioButton = React.createClass({
propTypes: {
name: React.PropTypes.string,
onClick: React.PropTypes.func,
value: React.PropTypes.string
value: React.PropTypes.string,
label: React.PropTypes.string
},

mixins: [Classable],
Expand All @@ -35,6 +36,7 @@ var RadioButton = React.createClass({
<div className={classes} onClick={this._onClick}>
<input ref="radioButton" type="radio" name={this.props.name} value={this.props.value} />
<div className="mui-radio-button-fill" />
<span className="mui-radio-button-label">{this.props.label}</span>
</div>
);
},
Expand Down
7 changes: 7 additions & 0 deletions docs/dist/less/components/checkbox.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
@checkbox-box-box-sizing: border-box;
@checkbox-box-position: absolute;
@checkbox-box-size: 18px;
@checkbox-label-spacing: @checkbox-box-size;
@checkbox-box-transform-origin: 40% 90%;
@checkbox-box-transform: rotate(0deg) scale(1);

Expand Down Expand Up @@ -37,6 +38,12 @@
display: @checkbox-input-display;
}

.mui-checkbox-label {
position: relative;
left: @checkbox-label-spacing;
padding: 0 5px;
}

.mui-checkbox-box {
.ease-out;
background-color: @checkbox-box-background-color;
Expand Down
6 changes: 6 additions & 0 deletions docs/dist/less/components/radio-button.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
width: @radio-button-size;
}

.mui-radio-button-label {
position: relative;
left: @radio-button-size;
padding: 0 3px;
}

input[type=radio] {
display: none;

Expand Down