-
Notifications
You must be signed in to change notification settings - Fork 2
Toggle
brandonk1234 edited this page Feb 23, 2017
·
2 revisions
This ui element displays to the user an on or off looking choice.
The props needed for this component are listed and explained below:
-
initialValue
- This prop must be aboolean
. -
toggleId
- This prop must be astring
. -
onChange
- This prop must be afunction
.
<Toggle
initialValue={false}
toggleId="toggle-id"
onChange={this.onChange}
/>
// ...React Component
onChange: function() {
console.log("This component has been changed");
}