Skip to content

Commit dd376a1

Browse files
committed
Library is ready to beta 1 publish with 2.0.0 version
1 parent b3da821 commit dd376a1

File tree

6 files changed

+55
-285
lines changed

6 files changed

+55
-285
lines changed

example/lib/BouncyCheckbox.style.ts

Lines changed: 0 additions & 47 deletions
This file was deleted.

example/lib/BouncyCheckbox.tsx

Lines changed: 0 additions & 142 deletions
This file was deleted.

example/lib/check.png

-675 Bytes
Binary file not shown.

lib/BouncyCheckbox.style.ts

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,60 +3,44 @@ import { ViewStyle, TextStyle, ImageStyle, StyleSheet } from "react-native";
33
interface Style {
44
container: ViewStyle;
55
textContainer: ViewStyle;
6+
iconImageStyle: ImageStyle;
67
}
78

89
export const _iconContainer = (
910
size: number,
10-
borderWidth: number,
11-
borderRadius: number,
12-
borderColor: string,
1311
checked: boolean,
1412
fillColor: string,
1513
unfillColor: string,
1614
): ViewStyle => {
1715
return {
1816
width: size,
1917
height: size,
20-
borderWidth,
21-
borderColor,
22-
borderRadius,
18+
borderWidth: 1,
19+
borderColor: "#ffc484",
20+
borderRadius: size / 2,
2321
alignItems: "center",
2422
justifyContent: "center",
2523
backgroundColor: checked ? fillColor : unfillColor,
2624
};
2725
};
2826

29-
export const _textStyle = (
30-
checked: boolean,
31-
color: string,
32-
fontFamily?: string,
33-
fontSize?: number,
34-
textDecoration?: string,
35-
): TextStyle => {
27+
export const _textStyle = (checked: boolean): TextStyle => {
3628
return {
37-
fontSize,
38-
fontFamily,
39-
color,
40-
textDecorationLine: !textDecoration && checked ? "line-through" : "none",
29+
fontSize: 16,
30+
color: "#757575",
31+
textDecorationLine: checked ? "line-through" : "none",
4132
};
4233
};
4334

44-
export const _iconImageStyle = (
45-
checkImageWidth: number,
46-
checkImageHeight: number,
47-
checked: boolean,
48-
): ImageStyle => ({
49-
width: checkImageWidth,
50-
height: checkImageHeight,
51-
display: checked ? "flex" : "none",
52-
});
53-
5435
export default StyleSheet.create<Style>({
5536
container: {
56-
margin: 8,
5737
alignItems: "center",
5838
flexDirection: "row",
5939
},
40+
iconImageStyle: {
41+
width: 10,
42+
height: 10,
43+
},
6044
textContainer: {
6145
marginLeft: 16,
6246
},

0 commit comments

Comments
 (0)