react-native-shared-components 0.2.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/lib/module/assets/arrow-left.png +0 -0
  2. package/lib/module/assets/arrow-right.png +0 -0
  3. package/lib/module/assets/avatar.png +0 -0
  4. package/lib/module/assets/check-circle.png +0 -0
  5. package/lib/module/assets/chevron-up.png +0 -0
  6. package/lib/module/assets/eye-off.png +0 -0
  7. package/lib/module/assets/eye.png +0 -0
  8. package/lib/module/assets/ic-solar_danger-bold.png +0 -0
  9. package/lib/module/assets/minus.png +0 -0
  10. package/lib/module/assets/plus.png +0 -0
  11. package/lib/module/assets/search-md.png +0 -0
  12. package/lib/module/assets/x.png +0 -0
  13. package/lib/module/components/BaseButton/index.js +160 -0
  14. package/lib/module/components/BaseButton/index.js.map +1 -0
  15. package/lib/module/components/BaseContainer/index.js +63 -0
  16. package/lib/module/components/BaseContainer/index.js.map +1 -0
  17. package/lib/module/components/BaseContainer/styles.js +20 -0
  18. package/lib/module/components/BaseContainer/styles.js.map +1 -0
  19. package/lib/module/components/BaseText/index.js +37 -0
  20. package/lib/module/components/BaseText/index.js.map +1 -0
  21. package/lib/module/components/index.js +3 -1
  22. package/lib/module/components/index.js.map +1 -1
  23. package/lib/module/constants/Colors.js +151 -0
  24. package/lib/module/constants/Colors.js.map +1 -0
  25. package/lib/module/constants/commonStyles.js +16 -0
  26. package/lib/module/constants/commonStyles.js.map +1 -0
  27. package/lib/module/constants/index.js +5 -0
  28. package/lib/module/constants/index.js.map +1 -0
  29. package/lib/module/index.js +3 -3
  30. package/lib/module/index.js.map +1 -1
  31. package/lib/module/utils/helper.js +11 -0
  32. package/lib/module/utils/helper.js.map +1 -0
  33. package/lib/module/utils/index.js +4 -0
  34. package/lib/module/utils/index.js.map +1 -0
  35. package/lib/typescript/src/components/BaseButton/index.d.ts +19 -0
  36. package/lib/typescript/src/components/BaseButton/index.d.ts.map +1 -0
  37. package/lib/typescript/src/components/BaseContainer/index.d.ts +25 -0
  38. package/lib/typescript/src/components/BaseContainer/index.d.ts.map +1 -0
  39. package/lib/typescript/src/components/BaseContainer/styles.d.ts +17 -0
  40. package/lib/typescript/src/components/BaseContainer/styles.d.ts.map +1 -0
  41. package/lib/typescript/src/components/BaseText/index.d.ts +11 -0
  42. package/lib/typescript/src/components/BaseText/index.d.ts.map +1 -0
  43. package/lib/typescript/src/components/index.d.ts +3 -1
  44. package/lib/typescript/src/components/index.d.ts.map +1 -1
  45. package/lib/typescript/src/constants/Colors.d.ts +145 -0
  46. package/lib/typescript/src/constants/Colors.d.ts.map +1 -0
  47. package/lib/typescript/src/constants/commonStyles.d.ts +10 -0
  48. package/lib/typescript/src/constants/commonStyles.d.ts.map +1 -0
  49. package/lib/typescript/src/constants/index.d.ts +3 -0
  50. package/lib/typescript/src/constants/index.d.ts.map +1 -0
  51. package/lib/typescript/src/index.d.ts +3 -1
  52. package/lib/typescript/src/index.d.ts.map +1 -1
  53. package/lib/typescript/src/utils/helper.d.ts +4 -0
  54. package/lib/typescript/src/utils/helper.d.ts.map +1 -0
  55. package/lib/typescript/src/utils/index.d.ts +2 -0
  56. package/lib/typescript/src/utils/index.d.ts.map +1 -0
  57. package/package.json +14 -5
  58. package/src/assets/arrow-left.png +0 -0
  59. package/src/assets/arrow-right.png +0 -0
  60. package/src/assets/avatar.png +0 -0
  61. package/src/assets/check-circle.png +0 -0
  62. package/src/assets/chevron-up.png +0 -0
  63. package/src/assets/eye-off.png +0 -0
  64. package/src/assets/eye.png +0 -0
  65. package/src/assets/ic-solar_danger-bold.png +0 -0
  66. package/src/assets/minus.png +0 -0
  67. package/src/assets/plus.png +0 -0
  68. package/src/assets/search-md.png +0 -0
  69. package/src/assets/x.png +0 -0
  70. package/src/components/BaseButton/index.tsx +227 -0
  71. package/src/components/BaseContainer/index.tsx +108 -0
  72. package/src/components/BaseContainer/styles.ts +18 -0
  73. package/src/components/BaseText/index.tsx +45 -0
  74. package/src/components/index.tsx +3 -1
  75. package/src/constants/Colors.ts +148 -0
  76. package/src/constants/commonStyles.ts +17 -0
  77. package/src/constants/index.tsx +2 -0
  78. package/src/index.tsx +3 -3
  79. package/src/utils/helper.ts +4 -0
  80. package/src/utils/index.tsx +1 -0
  81. package/lib/module/components/Button/index.js +0 -24
  82. package/lib/module/components/Button/index.js.map +0 -1
  83. package/lib/typescript/src/components/Button/index.d.ts +0 -11
  84. package/lib/typescript/src/components/Button/index.d.ts.map +0 -1
  85. package/src/components/Button/index.tsx +0 -32
@@ -0,0 +1,108 @@
1
+ import {
2
+ KeyboardAvoidingView,
3
+ Platform,
4
+ StatusBar,
5
+ TouchableOpacity,
6
+ View,
7
+ type ColorValue,
8
+ type TextStyle,
9
+ type ViewStyle,
10
+ type KeyboardAvoidingViewProps,
11
+ } from 'react-native';
12
+ import { type ReactNode } from 'react';
13
+ import { styles } from './styles';
14
+ import { SafeAreaView } from 'react-native-safe-area-context';
15
+ import BaseText, { type BaseTextType } from '../BaseText';
16
+
17
+ interface IBaseContainer {
18
+ title?: string;
19
+ center?: ReactNode;
20
+ right?: ReactNode;
21
+ left?: ReactNode;
22
+ onPressLeft?: () => void;
23
+ onPressRight?: () => void;
24
+ onPressCenter?: () => void;
25
+ styleTitle?: TextStyle;
26
+ isHeader?: boolean;
27
+ barStyle?: 'default' | 'light-content' | 'dark-content';
28
+ children: ReactNode;
29
+ style?: ViewStyle;
30
+ styleHeader?: ViewStyle;
31
+ backgroundColorStatusBar?: ColorValue | undefined;
32
+ edges?: Array<'top' | 'bottom' | 'left' | 'right'>;
33
+ keyboardAvoidingViewProps?: Omit<KeyboardAvoidingViewProps, 'children'>;
34
+ type?: BaseTextType;
35
+ }
36
+
37
+ export const BaseContainer = ({
38
+ style,
39
+ title,
40
+ left,
41
+ right,
42
+ center,
43
+ onPressLeft,
44
+ onPressRight,
45
+ onPressCenter,
46
+ styleTitle,
47
+ isHeader,
48
+ children,
49
+ backgroundColorStatusBar,
50
+ barStyle,
51
+ styleHeader,
52
+ edges,
53
+ keyboardAvoidingViewProps,
54
+ type = 'Medium',
55
+ }: IBaseContainer) => {
56
+ return (
57
+ <KeyboardAvoidingView
58
+ behavior={Platform.OS === 'ios' ? 'padding' : undefined}
59
+ style={styles.container}
60
+ {...keyboardAvoidingViewProps}
61
+ >
62
+ <View style={styles.container}>
63
+ <StatusBar
64
+ backgroundColor={backgroundColorStatusBar}
65
+ barStyle={barStyle}
66
+ />
67
+ <SafeAreaView style={[styles.safeView, style]} edges={edges}>
68
+ {isHeader && (
69
+ <View style={[styles.header, styleHeader]}>
70
+ {left ? (
71
+ <TouchableOpacity disabled={!onPressLeft} onPress={onPressLeft}>
72
+ {left}
73
+ </TouchableOpacity>
74
+ ) : (
75
+ <View />
76
+ )}
77
+ {center ? (
78
+ <TouchableOpacity
79
+ disabled={!onPressCenter}
80
+ onPress={onPressCenter}
81
+ >
82
+ {center}
83
+ </TouchableOpacity>
84
+ ) : title ? (
85
+ <BaseText type={type} style={styleTitle}>
86
+ {title}
87
+ </BaseText>
88
+ ) : (
89
+ <View />
90
+ )}
91
+ {right ? (
92
+ <TouchableOpacity
93
+ disabled={!onPressRight}
94
+ onPress={onPressRight}
95
+ >
96
+ {right}
97
+ </TouchableOpacity>
98
+ ) : (
99
+ <View />
100
+ )}
101
+ </View>
102
+ )}
103
+ {children}
104
+ </SafeAreaView>
105
+ </View>
106
+ </KeyboardAvoidingView>
107
+ );
108
+ };
@@ -0,0 +1,18 @@
1
+ import { StyleSheet } from 'react-native';
2
+
3
+ export const styles = StyleSheet.create({
4
+ container: {
5
+ flex: 1,
6
+ },
7
+ safeView: {
8
+ flex: 1,
9
+ },
10
+ header: {
11
+ alignItems: 'center',
12
+ justifyContent: 'space-between',
13
+ flexDirection: 'row',
14
+ width: '100%',
15
+ paddingVertical: 12,
16
+ paddingHorizontal: 20,
17
+ },
18
+ });
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import { Text, StyleSheet, type TextProps } from 'react-native';
3
+
4
+ export type BaseTextType = 'ExtraBold' | 'Bold' | 'SemiBold' | 'Medium';
5
+
6
+ interface BaseTextProps extends TextProps {
7
+ type?: BaseTextType;
8
+ size?: number;
9
+ children: React.ReactNode;
10
+ }
11
+
12
+ const BaseText: React.FC<BaseTextProps> = ({
13
+ type = 'Medium',
14
+ size,
15
+ style,
16
+ children,
17
+ ...props
18
+ }) => {
19
+ return (
20
+ <Text
21
+ allowFontScaling={false}
22
+ style={[styles[type], { fontSize: size }, style]}
23
+ {...props}
24
+ >
25
+ {children}
26
+ </Text>
27
+ );
28
+ };
29
+
30
+ const styles = StyleSheet.create({
31
+ ExtraBold: {
32
+ fontWeight: '700',
33
+ },
34
+ Bold: {
35
+ fontWeight: '600',
36
+ },
37
+ SemiBold: {
38
+ fontWeight: '500',
39
+ },
40
+ Medium: {
41
+ fontWeight: '400',
42
+ },
43
+ });
44
+
45
+ export default BaseText;
@@ -1 +1,3 @@
1
- export * from './Button';
1
+ export * from './BaseButton';
2
+ export * from './BaseContainer';
3
+ export * from './BaseText';
@@ -0,0 +1,148 @@
1
+ export const Colors = {
2
+ bg_default_primary_light: '#FFFFFF',
3
+ bg_default_primary_dark: '#27272A',
4
+ bg_default_secondary_light: '#F9F9FB',
5
+ bg_default_secondary_dark: '#38383D',
6
+ bg_default_tertiary_light: '#F5F6FB',
7
+ bg_default_tertiary_dark: '#515158',
8
+ bg_neutral_tertiary_light: '#EBEBF0',
9
+ bg_inverse_primary_light: '#000000',
10
+ bg_disabled_primary_light: '#DDDDE3',
11
+ bg_brand_primary: '#00B894',
12
+ bg_brand_secondary: '#00B894',
13
+ bg_brand_tertiary: '#EAFFF8',
14
+ bg_brand_over_light: '#00A484',
15
+ bg_brand_over_dark: '#006758',
16
+ bg_green_primary: '#1FC86E',
17
+ bg_green_secondary: '#84F1B6',
18
+ bg_green_tertiary: '#F0FDF5',
19
+ bg_green_over_light: '#14AE5C',
20
+ bg_green_over_dark: '#F0FDF5',
21
+ bg_yellow_primary: '#FBD204',
22
+ bg_yellow_secondary: '#FFF044',
23
+ bg_yellow_tertiary: '#FEFEE8',
24
+ bg_yellow_over_light: '#CE9B00',
25
+ bg_yellow_over_dark: '#FEFEE8',
26
+ bg_red_primary: '#FF424E',
27
+ bg_red_secondary: '#FF99A0',
28
+ bg_red_tertiary: '#FFF0F1',
29
+ bg_red_over_light: '#D93843',
30
+ bg_red_over_dark: '#FFF0F1',
31
+ //Border
32
+ border_default_primary_light: '#F9F9FB',
33
+ border_default_primary_dark: '#38383D',
34
+ border_default_secondary_light: '#EBEBF0',
35
+ border_default_secondary_dark: '#515158',
36
+ border_default_tertiary_light: '#DDDDE3',
37
+ border_default_tertiary_dark: '#64646D',
38
+ border_neutral_primary_light: '#64646D',
39
+ border_neutral_primary_dark: '#DDDDE3',
40
+ border_neutral_secondary: '#A6A6B0',
41
+ border_neutral_tertiary_light: '#C4C4CF',
42
+ border_neutral_tertiary_dark: '#808089',
43
+ border_disabled_primary_light: '#DDDDE3',
44
+ border_disabled_primary_dark: '#64646D',
45
+ border_disabled_secondary_light: '#EBEBF0',
46
+ border_disabled_secondary_dark: '#515158',
47
+ border_disabled_tertiary_light: '#F9F9FB',
48
+ border_disabled_tertiary_dark: '#38383D',
49
+ border_brand_primary: '#00B894',
50
+ border_brand_secondary: '#63F2CC',
51
+ border_brand_tertiary: '#EAFFF8',
52
+ border_green_primary: '#1FC86E',
53
+ border_green_secondary: '#84F1B6',
54
+ border_green_tertiary: '#F0FDF5',
55
+ border_yellow_primary: '#FBD204',
56
+ border_yellow_secondary: '#FFF044',
57
+ border_yellow_tertiary: '#FEFEE8',
58
+ border_red_primary: '#FF424E',
59
+ border_red_secondary: '#FF99A0',
60
+ border_red_tertiary: '#FFF0F1',
61
+ //Icon
62
+ icon_default_primary_light: '#38383D',
63
+ icon_default_primary_dark: '#F9F9FB',
64
+ icon_default_secondary_light: '#64646D',
65
+ icon_default_secondary_dark: '#EBEBF0',
66
+ icon_default_tertiary_light: '#808089',
67
+ icon_default_tertiary_dark: '#DDDDE3',
68
+ icon_neutral_primary_light: '#808089',
69
+ icon_neutral_primary_dark: '#F9F9FB',
70
+ icon_neutral_secondary_light: '#A6A6B0',
71
+ icon_neutral_secondary_dark: '#DDDDE3',
72
+ icon_neutral_tertiary: '#C4C4CF',
73
+ icon_inverse_primary_light: '#FFFFFF',
74
+ icon_inverse_primary_dark: '#27272A',
75
+ icon_inverse_secondary_light: '#DDDDE3',
76
+ icon_inverse_secondary_dark: '#64646D',
77
+ icon_inverse_tertiary: '#A6A6B0',
78
+ icon_disabled_primary_light: '#FFFFFF',
79
+ icon_disabled_primary_dark: '#27272A',
80
+ icon_disabled_secondary_light: '#EBEBF0',
81
+ icon_disabled_secondary_dark: '#515158',
82
+ icon_disabled_tertiary_light: '#C4C4CF',
83
+ icon_disabled_tertiary_dark: '#808089',
84
+ icon_brand_primary: '#00B894',
85
+ icon_brand_secondary: '#63F2CC',
86
+ icon_brand_tertiary: '#EAFFF8',
87
+ icon_brand_over: '#006758',
88
+ icon_green_primary: '#1FC86E',
89
+ icon_green_secondary: '#84F1B6',
90
+ icon_green_tertiary: '#F0FDF5',
91
+ icon_yellow_primary: '#FBD204',
92
+ icon_yellow_secondary: '#FFF044',
93
+ icon_yellow_tertiary: '#FEFEE8',
94
+ icon_red_primary: '#FF424E',
95
+ icon_red_secondary: '#FF99A0',
96
+ icon_red_tertiary: '#FFF0F1',
97
+ //Text
98
+ text_default_primary_light: '#38383D',
99
+ text_default_primary_dark: '#F9F9FB',
100
+ text_default_secondary_light: '#64646D',
101
+ text_default_secondary_dark: '#EBEBF0',
102
+ text_default_tertiary_light: '#808089',
103
+ text_default_tertiary_dark: '#DDDDE3',
104
+ text_neutral_primary_light: '#808089',
105
+ text_neutral_primary_dark: '#F9F9FB',
106
+ text_neutral_secondary_light: '#A6A6B0',
107
+ text_neutral_secondary_dark: '#DDDDE3',
108
+ text_neutral_tertiary: '#C4C4CF',
109
+ text_inverse_primary_light: '#FFFFFF',
110
+ text_inverse_primary_dark: '#27272A',
111
+ text_inverse_secondary_light: '#DDDDE3',
112
+ text_inverse_secondary_dark: '#64646D',
113
+ text_inverse_tertiary: '#A6A6B0',
114
+ text_disabled_primary_light: '#FFFFFF',
115
+ text_disabled_primary_dark: '#27272A',
116
+ text_disabled_secondary_light: '#EBEBF0',
117
+ text_disabled_secondary_dark: '#515158',
118
+ text_disabled_tertiary_light: '#C4C4CF',
119
+ text_disabled_tertiary_dark: '#808089',
120
+ text_brand_primary: '#00B894',
121
+ text_brand_secondary: '#63F2CC',
122
+ text_brand_tertiary: '#EAFFF8',
123
+ text_brand_over: '#006758',
124
+ text_green_primary: '#1FC86E',
125
+ text_green_secondary: '#84F1B6',
126
+ text_green_tertiary: '#F0FDF5',
127
+ text_yellow_primary: '#FBD204',
128
+ text_yellow_secondary: '#FFF044',
129
+ text_yellow_tertiary: '#FEFEE8',
130
+ text_red_primary: '#FF424E',
131
+ text_red_secondary: '#FF99A0',
132
+ text_red_tertiary: '#FFF0F1',
133
+ //Overlay
134
+ overlay_4: 'rgba(0,0,0,0.04)',
135
+ overlay_20_light: 'rgba(0,0,0,0.2)',
136
+ overlay_20_dark: 'rgba(255,255,255,0.2)',
137
+ overlay_30_light: 'rgba(0,0,0,0.3)',
138
+ overlay_30_dark: 'rgba(255,255,255,0.3)',
139
+ overlay_40_light: 'rgba(0,0,0,0.4)',
140
+ overlay_40_dark: 'rgba(255,255,255,0.4)',
141
+ overlay_60_light: 'rgba(0,0,0,0.6)',
142
+ overlay_60_dark: 'rgba(255,255,255,0.6)',
143
+ overlay_80_light: 'rgba(0,0,0,0.8)',
144
+ overlay_80_dark: 'rgba(255,255,255,0.8)',
145
+ overlay_4_light: 'rgba(255,255,255,0.04)',
146
+ overlay_8_light: 'rgba(255,255,255,0.08)',
147
+ overlay_70_light: 'rgba(255,255,255,0.7)',
148
+ };
@@ -0,0 +1,17 @@
1
+ import { Dimensions } from 'react-native';
2
+
3
+ export const SCREEN_WIDTH: number = Dimensions.get('window').width;
4
+ export const SCREEN_HEIGHT: number = Dimensions.get('window').height;
5
+ const space_default = 4;
6
+ export const space_squish = ({
7
+ vertical = space_default,
8
+ horizontal = space_default,
9
+ }: {
10
+ vertical?: number;
11
+ horizontal?: number;
12
+ }) => {
13
+ return {
14
+ paddingVertical: vertical,
15
+ paddingHorizontal: horizontal,
16
+ };
17
+ };
@@ -0,0 +1,2 @@
1
+ export * from './Colors';
2
+ export * from './commonStyles';
package/src/index.tsx CHANGED
@@ -1,3 +1,3 @@
1
- export function multiply(a: number, b: number): number {
2
- return a * b;
3
- }
1
+ export * from './components';
2
+ export * from './constants';
3
+ export * from './utils';
@@ -0,0 +1,4 @@
1
+ export const filterLayoutProps = (props: any) => {
2
+ const { ...otherProps } = props;
3
+ return { otherProps };
4
+ };
@@ -0,0 +1 @@
1
+ export * from './helper';
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- import { Text, TouchableOpacity } from 'react-native';
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- export const Button = ({
6
- onPress,
7
- title,
8
- textBtnStyles
9
- }) => {
10
- return /*#__PURE__*/_jsx(TouchableOpacity, {
11
- onPress: onPress,
12
- children: /*#__PURE__*/_jsx(Text, {
13
- style: {
14
- // color: typography?.['Text_text-primary_(700)'] ?? 'white',
15
- // fontSize: typography?.text1_fontSize ?? 15,
16
- // fontWeight: typography?.text1_fontWeight ?? '600',
17
- // lineHeight: typography?.text1_lineHeight ?? 18,
18
- ...textBtnStyles
19
- },
20
- children: title
21
- })
22
- });
23
- };
24
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Text","TouchableOpacity","jsx","_jsx","Button","onPress","title","textBtnStyles","children","style"],"sourceRoot":"../../../../src","sources":["components/Button/index.tsx"],"mappings":";;AAAA,SACEA,IAAI,EACJC,gBAAgB,QAIX,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAStB,OAAO,MAAMC,MAAM,GAAGA,CAAC;EAAEC,OAAO;EAAEC,KAAK;EAAEC;AAAuB,CAAC,KAAK;EACpE,oBACEJ,IAAA,CAACF,gBAAgB;IAACI,OAAO,EAAEA,OAAQ;IAAAG,QAAA,eACjCL,IAAA,CAACH,IAAI;MACHS,KAAK,EAAE;QACL;QACA;QACA;QACA;QACA,GAAGF;MACL,CAAE;MAAAC,QAAA,EAEDF;IAAK,CACF;EAAC,CACS,CAAC;AAEvB,CAAC","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- import { type GestureResponderEvent, type TextStyle, type ViewStyle } from 'react-native';
2
- export interface IButton {
3
- title: string;
4
- buttonStyles?: ViewStyle;
5
- textBtnStyles?: TextStyle;
6
- isLoading?: boolean;
7
- onPress?: (e: GestureResponderEvent) => void;
8
- type?: 'primary' | 'secondary';
9
- }
10
- export declare const Button: ({ onPress, title, textBtnStyles }: IButton) => import("react/jsx-runtime").JSX.Element;
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC7C,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;CAChC;AACD,eAAO,MAAM,MAAM,GAAI,mCAAmC,OAAO,4CAgBhE,CAAC"}
@@ -1,32 +0,0 @@
1
- import {
2
- Text,
3
- TouchableOpacity,
4
- type GestureResponderEvent,
5
- type TextStyle,
6
- type ViewStyle,
7
- } from 'react-native';
8
- export interface IButton {
9
- title: string;
10
- buttonStyles?: ViewStyle;
11
- textBtnStyles?: TextStyle;
12
- isLoading?: boolean;
13
- onPress?: (e: GestureResponderEvent) => void;
14
- type?: 'primary' | 'secondary';
15
- }
16
- export const Button = ({ onPress, title, textBtnStyles }: IButton) => {
17
- return (
18
- <TouchableOpacity onPress={onPress}>
19
- <Text
20
- style={{
21
- // color: typography?.['Text_text-primary_(700)'] ?? 'white',
22
- // fontSize: typography?.text1_fontSize ?? 15,
23
- // fontWeight: typography?.text1_fontWeight ?? '600',
24
- // lineHeight: typography?.text1_lineHeight ?? 18,
25
- ...textBtnStyles,
26
- }}
27
- >
28
- {title}
29
- </Text>
30
- </TouchableOpacity>
31
- );
32
- };