Skip to content

Commit 069fa14

Browse files
committed
Breaking change: disableBuiltInActiveSystem is not here anymore.
1 parent 9c61790 commit 069fa14

File tree

3 files changed

+29
-27
lines changed

3 files changed

+29
-27
lines changed

README.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -83,29 +83,30 @@ inactiveCardBackgroundColor?: string;
8383

8484
## Customization (Optionals)
8585

86-
| Property | Type | Default | Description |
87-
| ------------------------------- | :--------: | :---------------------: | ----------------------------------------------------------------------- |
88-
| onPress | function | undefined | set your own logic for the button functionality when it is pressed |
89-
| onCardPress | function | undefined | set your own logic for the card button functionality when it is pressed |
90-
| isActive | boolean | false | set the initial isActive state |
91-
| style | ViewStyle | default | set or override the style object for the main container |
92-
| checkboxContainerStyle | ViewStyle | default | set or override the style object for the checkbox container |
93-
| iconContainerStyle | ViewStyle | default | set or override the style object for the icon container |
94-
| iconImageStyle | ImageStyle | default | set or override the style object for the icon image |
95-
| titleTextStyle | TextStyle | default | set or override the style object for the title text |
96-
| dateTextStyle | TextStyle | default | set or override the style object for the date text |
97-
| descriptionTextStyle | TextStyle | default | set or override the style object for the description text |
98-
| titleNumberOfLines | number | 2 | change the title number of lines |
99-
| checkboxBorderColor | color | "rgba(100,100,100,0.9)" | change the checkbox border color |
100-
| activeCheckboxBackgroundColor | color | "#63eead" | change the active checkbox container background color |
101-
| inactiveCheckboxBackgroundColor | color | "transparent" | change the inactive checkbox container background color |
102-
| activeCardBackgroundColor | color | "#2173FF" | change the active card container background color |
103-
| activeCheckboxBackgroundColor | color | "#343c4d" | change the inactive card container background color |
104-
| disableBuiltInActiveSystem | boolean | false | disable the built in active control system |
105-
| disableDate | boolean | false | disable date component |
106-
| dateContainerStyle | ViewStyle | default | set or override the style object for the checkbox date container |
107-
| titleContainerStyle | ViewStyle | default | set or override the style object for the checkbox title container |
108-
| descriptionContainerStyle | ViewStyle | default | set or override the style object for the checkbox description container |
86+
| Property | Type | Default | Description |
87+
| ------------------------------------- | :--------: | :---------------------: | ----------------------------------------------------------------------- |
88+
| onPress | function | undefined | set your own logic for the button functionality when it is pressed |
89+
| onCardPress | function | undefined | set your own logic for the card button functionality when it is pressed |
90+
| isActive | boolean | false | set the initial isActive state |
91+
| style | ViewStyle | default | set or override the style object for the main container |
92+
| checkboxContainerStyle | ViewStyle | default | set or override the style object for the checkbox container |
93+
| iconContainerStyle | ViewStyle | default | set or override the style object for the icon container |
94+
| iconImageStyle | ImageStyle | default | set or override the style object for the icon image |
95+
| titleTextStyle | TextStyle | default | set or override the style object for the title text |
96+
| dateTextStyle | TextStyle | default | set or override the style object for the date text |
97+
| descriptionTextStyle | TextStyle | default | set or override the style object for the description text |
98+
| titleNumberOfLines | number | 2 | change the title number of lines |
99+
| checkboxBorderColor | color | "rgba(100,100,100,0.9)" | change the checkbox border color |
100+
| activeCheckboxBackgroundColor | color | "#63eead" | change the active checkbox container background color |
101+
| inactiveCheckboxBackgroundColor | color | "transparent" | change the inactive checkbox container background color |
102+
| activeCardBackgroundColor | color | "#2173FF" | change the active card container background color |
103+
| activeCheckboxBackgroundColor | color | "#343c4d" | change the inactive card container background color |
104+
| disableBuiltInActiveSystemForCheckbox | boolean | false | disable the built in active control system for checkbox |
105+
| disableBuiltInActiveSystemForCard | boolean | false | disable the built in active control system for card |
106+
| disableDate | boolean | false | disable date component |
107+
| dateContainerStyle | ViewStyle | default | set or override the style object for the checkbox date container |
108+
| titleContainerStyle | ViewStyle | default | set or override the style object for the checkbox title container |
109+
| descriptionContainerStyle | ViewStyle | default | set or override the style object for the checkbox description container |
109110

110111
## Future Plans
111112

lib/CheckboxFlex.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ interface ICheckboxFlexProps {
3535
checkboxBorderColor?: string;
3636
activeCardBackgroundColor?: string;
3737
inactiveCardBackgroundColor?: string;
38-
disableBuiltInActiveSystem?: boolean;
38+
disableBuiltInActiveSystemForCheckbox?: boolean;
39+
disableBuiltInActiveSystemForCard?: boolean;
3940
activeCheckboxBackgroundColor?: string;
4041
inactiveCheckboxBackgroundColor?: string;
4142
style?: CustomStyleProp;
@@ -71,7 +72,7 @@ export default class CheckboxFlex extends React.Component<
7172

7273
handlePress = () => {
7374
this.cardRef?.animate();
74-
if (!this.props.disableBuiltInActiveSystem) {
75+
if (!this.props.disableBuiltInActiveSystemForCheckbox) {
7576
this.setState({ isActive: !this.state.isActive }, () => {
7677
this.props.onPress && this.props.onPress(this.state.isActive);
7778
});
@@ -81,7 +82,7 @@ export default class CheckboxFlex extends React.Component<
8182
};
8283

8384
handleCardPress = () => {
84-
if (!this.props.disableBuiltInActiveSystem) {
85+
if (!this.props.disableBuiltInActiveSystemForCard) {
8586
this.setState({ isActive: !this.state.isActive }, () => {
8687
this.props.onCardPress && this.props.onCardPress(this.state.isActive);
8788
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-checkbox-flex",
3-
"version": "0.1.13",
3+
"version": "0.2.0",
44
"description": "Fully customizable, easy to use checkbox with flexible component by React Native on Android and iOS",
55
"main": "./build/dist/CheckboxFlex.js",
66
"repository": "[email protected]:WrathChaos/react-native-checkbox-flex.git",

0 commit comments

Comments
 (0)