Skip to content

Commit 8900640

Browse files
author
Andrei Paramoshkin
committed
README updates
1 parent 9965445 commit 8900640

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ Circle-style checkbox component for React Native.
1010
## Usage
1111

1212
```js
13+
import CircleCheckBox, {LABEL_POSITION} from 'react-native-circle-checkbox';
14+
1315
<CircleCheckBox
1416
checked={true}
1517
onToggle={(checked) => console.log('My state is: ', checked)}
18+
labelPosition={LABEL_POSITION.RIGHT}
19+
label="Checkbox example"
1620
/>
1721
```
1822

@@ -33,6 +37,6 @@ Circle-style checkbox component for React Native.
3337
- `filterColor` : Color of underlayer circle. Default: `#FFF`
3438
- `innerColor` : Color of flag. Default: `#FC9527`
3539
- `label` : Checkbox label. Default: empty
36-
- `labelPosition` : Label rendering position. Default: `right`, may be 'right' or 'left'
40+
- `labelPosition` : Label rendering position. Default: `right`, may be 'right' or 'left'. For your convenience this package exports `LABEL_POSITION` object with two keys - `RIGHT` and `LEFT`. You can use it for `labelPosition` definition.
3741
- `styleCheckboxContainer`: Styles for checkbox container.
3842
- `styleLabel`: Styles for label.

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default class CircleCheckBox extends React.Component {
4141
filterColor: '#FFF',
4242
innerColor: '#FC9527',
4343
label: '',
44-
labelPosition: 'right',
44+
labelPosition: LABEL_POSITION.RIGHT,
4545
styleLabel: {}
4646
};
4747

0 commit comments

Comments
 (0)