File tree Expand file tree Collapse file tree
docs/app/Examples/modules/Checkbox Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export default class CheckboxCheckedExample extends Component {
1212
1313 render ( ) {
1414 return (
15- < Checkbox label = 'This checkbox comes prechecked' checked = { this . state . isChecked } onChange = { this . handleChange } />
15+ < Checkbox defaultChecked = { true } label = 'This checkbox comes prechecked' />
1616 ) ;
1717 }
1818}
Original file line number Diff line number Diff line change 11import React , { Component } from 'react' ;
22import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' ;
33import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' ;
4+ import { Message } from 'stardust' ;
45
56export default class CheckboxStatesExamples extends Component {
67 render ( ) {
@@ -10,7 +11,17 @@ export default class CheckboxStatesExamples extends Component {
1011 title = 'Checked'
1112 description = 'A checkbox can come pre-checked'
1213 examplePath = 'modules/Checkbox/States/Checked'
13- />
14+ >
15+ < Message className = 'info' >
16+ Use
17+
18+ < a href = 'https://facebook.github.io/react/docs/forms.html#default-value' target = '_blank' >
19+ < code > defaultChecked</ code >
20+ </ a >
21+
22+ as you normally would to set default form values.
23+ </ Message >
24+ </ ComponentExample >
1425 < ComponentExample
1526 title = 'Disabled'
1627 description = 'Checkboxes can be disabled'
Original file line number Diff line number Diff line change @@ -6,13 +6,13 @@ export default class CheckboxFittedExample extends Component {
66 return (
77 < div >
88 < Segment className = 'compact' >
9- < Checkbox className = 'fitted' />
9+ < Checkbox />
1010 </ Segment >
1111 < Segment className = 'compact' >
12- < Checkbox className = 'fitted slider' />
12+ < Checkbox className = 'slider' />
1313 </ Segment >
1414 < Segment className = 'compact' >
15- < Checkbox className = 'fitted toggle' />
15+ < Checkbox className = 'toggle' />
1616 </ Segment >
1717 </ div >
1818 ) ;
Original file line number Diff line number Diff line change 11import React , { Component } from 'react' ;
22import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' ;
33import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' ;
4+ import { Message } from 'stardust' ;
45
56export default class CheckboxVariationsExamples extends Component {
67 render ( ) {
@@ -10,7 +11,15 @@ export default class CheckboxVariationsExamples extends Component {
1011 title = 'Fitted'
1112 description = 'A fitted checkbox does not leave padding for a label'
1213 examplePath = 'modules/Checkbox/Variations/Fitted'
13- />
14+ >
15+ < Message >
16+ The
17+ < a href = 'http://semantic-ui.com/modules/checkbox.html#fitted' target = '_blank' >
18+ fitted
19+ </ a >
20+ class is automatically applied if there is no < code > label</ code > prop.
21+ </ Message >
22+ </ ComponentExample >
1423 </ ExampleSection >
1524 ) ;
1625 }
You can’t perform that action at this time.
0 commit comments