Skip to content

Commit 544de16

Browse files
committed
Updating README
1 parent 12a73cb commit 544de16

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ yarn add pretty-checkbox pretty-checkbox-react
4747
import React from 'react';
4848
import { Checkbox } from 'pretty-checkbox-react';
4949

50+
import 'pretty-checkbox';
51+
5052
function App() {
5153
const [checked, setChecked] = React.useState(false);
5254

@@ -80,6 +82,8 @@ For your convenience, each component has a "useState" hook to takes care of conn
8082
import React from 'react';
8183
import { Checkbox, useCheckboxState } from 'pretty-checkbox-react';
8284

85+
import 'pretty-checkbox';
86+
8387
function App() {
8488
const checkbox = useCheckboxState();
8589

@@ -102,6 +106,8 @@ PCR works as an uncontrolled component too. This allows you to easily integrate
102106
import React from 'react';
103107
import { Checkbox } from 'pretty-checkbox-react';
104108

109+
import 'pretty-checkbox';
110+
105111
const ref = React.createRef();
106112

107113
function App() {
@@ -130,6 +136,11 @@ function App() {
130136
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:
131137

132138
```jsx
139+
import * as React from 'react';
140+
import { Checkbox } from 'pretty-checkbox-react';
141+
142+
import 'pretty-checkbox';
143+
133144
class Demo extends React.Component {
134145
constructor(props) {
135146
super(props);
@@ -160,6 +171,8 @@ To make working with managed form solutions easier, PCR has a generic `Group` co
160171
import * as React from 'react';
161172
import { Radio, useRadioState, RadioGroup } from 'pretty-checkbox-react';
162173

174+
import 'pretty-checkbox';
175+
163176
function App() {
164177
const radio = useRadioState();
165178

0 commit comments

Comments
 (0)