File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,14 @@ const MyComponent: React.FC = () => {
61
61
return (
62
62
< div>
63
63
< h2> Toggle Switch Example< / h2>
64
- < ToggleSwitch checked= {isChecked} onColor= {" #0f0" } offColor= {" #0ff" } handleOnColor = { " orange " } handleOffColor = { " red " } onToggle= {handleChange} / >
64
+ < ToggleSwitch checked= {isChecked} onColor= {" #0f0" } offColor= {" #0ff" } onToggle= {handleChange} / >
65
65
< / div>
66
66
);
67
67
};
68
68
69
69
70
70
```
71
- ** Note** : Except v1.0.8 all other version need to import below file in App.jsx/tsx or main.jsx/tsx for styles to work.
71
+ ** Note** : Except v1.0.8,v1.2.11 all other version need to import below file in App.jsx/tsx or main.jsx/tsx for styles to work.
72
72
73
73
``` js
74
74
import ' reactjs-toggleswitch/dist/cjs/index.css' ;
@@ -93,8 +93,8 @@ The `ToggleSwitch` component accepts the following props:
93
93
| ` offColor ` | ` string ` | specifies background color change when switch is unchecked |
94
94
| ` disable ` | ` boolean ` | specifies for disabling/enabling the toggle. |
95
95
| ` ariaLabel ` | ` string ` | used to provide a label or description for an element. |
96
- | ` handleOnColor ` | ` string ` | specifies thumb color change when switch is checked |
97
- | ` handleOffColor ` | ` string ` | specifies thumb color change when switch is unchecked |
96
+ | ` children ` | ` component ` | specifies thumb icon use any component like font-awesome |
97
+
98
98
99
99
## Author
100
100
[ Subramanya KS] ( https://github.com/SubramanyaKS )
You can’t perform that action at this time.
0 commit comments