@@ -47,6 +47,8 @@ yarn add pretty-checkbox pretty-checkbox-react
47
47
import React from ' react' ;
48
48
import { Checkbox } from ' pretty-checkbox-react' ;
49
49
50
+ import ' pretty-checkbox' ;
51
+
50
52
function App () {
51
53
const [checked , setChecked ] = React .useState (false );
52
54
@@ -80,6 +82,8 @@ For your convenience, each component has a "useState" hook to takes care of conn
80
82
import React from ' react' ;
81
83
import { Checkbox , useCheckboxState } from ' pretty-checkbox-react' ;
82
84
85
+ import ' pretty-checkbox' ;
86
+
83
87
function App () {
84
88
const checkbox = useCheckboxState ();
85
89
@@ -102,6 +106,8 @@ PCR works as an uncontrolled component too. This allows you to easily integrate
102
106
import React from ' react' ;
103
107
import { Checkbox } from ' pretty-checkbox-react' ;
104
108
109
+ import ' pretty-checkbox' ;
110
+
105
111
const ref = React .createRef ();
106
112
107
113
function App () {
@@ -130,6 +136,11 @@ function App() {
130
136
React 16.8 is required for pretty checkbox react to work. If you're on the required version, then you can use class components too:
131
137
132
138
``` jsx
139
+ import * as React from ' react' ;
140
+ import { Checkbox } from ' pretty-checkbox-react' ;
141
+
142
+ import ' pretty-checkbox' ;
143
+
133
144
class Demo extends React .Component {
134
145
constructor (props ) {
135
146
super (props);
@@ -160,6 +171,8 @@ To make working with managed form solutions easier, PCR has a generic `Group` co
160
171
import * as React from ' react' ;
161
172
import { Radio , useRadioState , RadioGroup } from ' pretty-checkbox-react' ;
162
173
174
+ import ' pretty-checkbox' ;
175
+
163
176
function App () {
164
177
const radio = useRadioState ();
165
178
0 commit comments