Skip to content

Commit f4b241d

Browse files
Merge pull request #4 from kesha-antonov/master
add prop styleLabel
2 parents 6a5d721 + b6d0a02 commit f4b241d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ Circle-style checkbox component for React Native.
3535
- `label` : Checkbox label. Default: empty
3636
- `labelPosition` : Label rendering position. Default: `right`, may be 'right' or 'left'
3737
- `styleCheckboxContainer`: Styles for checkbox container.
38+
- `styleLabel`: Styles for label.

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class CircleCheckBox extends Component {
2929
onToggle: React.PropTypes.func.isRequired,
3030
labelPosition: React.PropTypes.oneOf(['right', 'left']),
3131
styleCheckboxContainer: View.propTypes.style,
32+
styleLabel: View.propTypes.style,
3233
};
3334

3435
static defaultProps = {
@@ -40,7 +41,8 @@ class CircleCheckBox extends Component {
4041
filterColor: '#FFF',
4142
innerColor: '#FC9527',
4243
label: '',
43-
labelPosition: 'right'
44+
labelPosition: 'right',
45+
styleLabel: {}
4446
};
4547

4648
constructor(props) {
@@ -104,7 +106,7 @@ class CircleCheckBox extends Component {
104106
_renderLabel(position) {
105107
var templ = (<View></View>);
106108
if ((this.props.label.length > 0) && (position === this.props.labelPosition)) {
107-
templ = (<Text style={styles.checkBoxLabel}>{this.props.label}</Text>);
109+
templ = (<Text style={[styles.checkBoxLabel, this.props.styleLabel]}>{this.props.label}</Text>);
108110
}
109111
return templ;
110112

0 commit comments

Comments
 (0)