Skip to content

Commit 08dd84a

Browse files
committed
simply remote example
1 parent d494687 commit 08dd84a

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

docs/app/Examples/modules/Checkbox/States/CheckboxRemoteControlExample.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,15 @@ import React, {Component} from 'react';
22
import {Button, Checkbox} from 'stardust';
33

44
export default class CheckboxRemoteControlExample extends Component {
5-
state = {checked: false};
6-
75
toggle = () => {
86
this.refs.checkbox.plugin('toggle');
97
};
108

11-
handleChange = () => {
12-
this.setState({
13-
checked: this.refs.checkbox.plugin('is checked')
14-
});
15-
};
16-
179
render() {
1810
return (
1911
<div>
2012
<Button onClick={this.toggle}>Toggle it</Button>
21-
<Checkbox label='Check this box' onChange={this.handleChange} ref='checkbox' />
22-
<p>It is {!this.state.checked && 'not '}checked.</p>
13+
<Checkbox label='Check this box' ref='checkbox' />
2314
</div>
2415
);
2516
}

0 commit comments

Comments
 (0)