react-native-exp-fig 0.1.0 → 0.1.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 (96) hide show
  1. package/package.json +200 -200
  2. package/src/common/constants/index.ts +5 -0
  3. package/src/common/icons-svg/arrow-drop-down/index.tsx +28 -28
  4. package/src/common/icons-svg/arrow-left/index.tsx +32 -32
  5. package/src/common/icons-svg/bluetooth/index.tsx +37 -37
  6. package/src/common/icons-svg/bluetooth-connected/index.tsx +41 -41
  7. package/src/common/icons-svg/calendar/index.tsx +40 -40
  8. package/src/common/icons-svg/call-bell/index.tsx +29 -29
  9. package/src/common/icons-svg/camera-plus/index.tsx +40 -40
  10. package/src/common/icons-svg/chart-bar/index.tsx +29 -0
  11. package/src/common/icons-svg/check-box-fill/index.tsx +30 -30
  12. package/src/common/icons-svg/check-box-outline/index.tsx +30 -30
  13. package/src/common/icons-svg/check-circle/index.tsx +27 -27
  14. package/src/common/icons-svg/closed/index.tsx +34 -34
  15. package/src/common/icons-svg/constants/index.ts +46 -43
  16. package/src/common/icons-svg/credit-card/index.tsx +32 -32
  17. package/src/common/icons-svg/currency/index.tsx +39 -39
  18. package/src/common/icons-svg/currency-circle-dollar/index.tsx +29 -0
  19. package/src/common/icons-svg/eye/index.tsx +31 -31
  20. package/src/common/icons-svg/eye-slash/index.tsx +31 -31
  21. package/src/common/icons-svg/file-text/index.tsx +39 -39
  22. package/src/common/icons-svg/gas-pump/index.tsx +39 -39
  23. package/src/common/icons-svg/gauge/index.tsx +39 -39
  24. package/src/common/icons-svg/gear/index.tsx +39 -39
  25. package/src/common/icons-svg/index.tsx +167 -149
  26. package/src/common/icons-svg/interface.d.ts +18 -18
  27. package/src/common/icons-svg/list/index.tsx +58 -58
  28. package/src/common/icons-svg/moon-stars/index.tsx +29 -29
  29. package/src/common/icons-svg/note-pincel/index.tsx +40 -40
  30. package/src/common/icons-svg/package/index.tsx +29 -0
  31. package/src/common/icons-svg/package-check/index.tsx +45 -45
  32. package/src/common/icons-svg/shopping-cart/index.tsx +39 -39
  33. package/src/common/icons-svg/steering-wheel/index.tsx +49 -49
  34. package/src/common/icons-svg/steering-wheel-fill/index.tsx +36 -36
  35. package/src/common/icons-svg/timer/index.tsx +39 -39
  36. package/src/common/icons-svg/trophy/index.tsx +29 -29
  37. package/src/common/icons-svg/truck/index.tsx +39 -39
  38. package/src/common/icons-svg/truck-trailer/index.tsx +36 -0
  39. package/src/common/icons-svg/wifi-high/index.tsx +43 -43
  40. package/src/common/icons-svg/wifi-x/index.tsx +50 -50
  41. package/src/components/box/index.tsx +47 -47
  42. package/src/components/box/interface.d.ts +31 -31
  43. package/src/components/box/styles.ts +21 -21
  44. package/src/components/button/index.tsx +61 -61
  45. package/src/components/button/interface.d.ts +40 -40
  46. package/src/components/button/styles.ts +34 -34
  47. package/src/components/capture-photo/index.tsx +125 -125
  48. package/src/components/capture-photo/interface.d.ts +44 -44
  49. package/src/components/capture-photo/styles.ts +24 -24
  50. package/src/components/card-hours/index.tsx +118 -118
  51. package/src/components/card-hours/interface.d.ts +37 -37
  52. package/src/components/card-scheduled-journey/index.tsx +138 -138
  53. package/src/components/card-scheduled-journey/interface.ts +42 -42
  54. package/src/components/card-scheduled-journey/styles.ts +26 -26
  55. package/src/components/header-profile/index.tsx +128 -128
  56. package/src/components/header-profile/interface.d.ts +52 -52
  57. package/src/components/input/index.tsx +176 -180
  58. package/src/components/input/interface.d.ts +55 -55
  59. package/src/components/input/styles.ts +23 -23
  60. package/src/components/menu-item/index.tsx +78 -0
  61. package/src/components/menu-item/interface.d.ts +19 -0
  62. package/src/components/menu-item/styles.ts +0 -0
  63. package/src/components/scheduled-journey-indicators/index.tsx +99 -99
  64. package/src/components/scheduled-journey-indicators/interface.d.ts +18 -18
  65. package/src/components/selects/select-option/index.tsx +104 -104
  66. package/src/components/selects/select-option/interface.d.ts +18 -18
  67. package/src/components/selects/select-option/styles.ts +75 -75
  68. package/src/components/step-indicator/helpers/get-icon-by-status.tsx +20 -20
  69. package/src/components/step-indicator/index.tsx +164 -164
  70. package/src/components/step-indicator/interface.d.ts +34 -34
  71. package/src/components/step-indicator/styles.ts +67 -67
  72. package/src/components/typography/index.tsx +67 -67
  73. package/src/components/typography/interface.d.ts +102 -102
  74. package/src/components/typography/styles.ts +34 -34
  75. package/src/components/user-profile/index.tsx +216 -0
  76. package/src/components/user-profile/interface.d.ts +22 -0
  77. package/src/index.tsx +25 -23
  78. package/src/stories/box/box.stories.tsx +106 -106
  79. package/src/stories/button/button.stories.tsx +143 -143
  80. package/src/stories/capture-photo/capture-photo.stories.tsx +170 -170
  81. package/src/stories/card-hours/card-hours.stories.tsx +102 -102
  82. package/src/stories/card-scheduled-journey/card-scheduled-journey.stories.tsx +101 -101
  83. package/src/stories/header-profile/header-profile.stories.tsx +84 -84
  84. package/src/stories/input/input.stories.tsx +286 -286
  85. package/src/stories/menu-item/menu-item.stories.tsx +76 -0
  86. package/src/stories/scheduled-journey-indicators/sheduled-journey-indicators.stories.tsx +74 -74
  87. package/src/stories/select-option/select-option.stories.tsx +46 -46
  88. package/src/stories/step-indicator/step-indicator.stories.tsx +116 -116
  89. package/src/stories/typography/typography.stories.tsx +146 -146
  90. package/src/stories/user-profile/user-profile.stories.tsx +56 -0
  91. package/src/styles/global/interface.d.ts +131 -131
  92. package/src/styles/global/styles.ts +63 -63
  93. package/src/styles/global/theme-provider.tsx +10 -10
  94. package/src/styles/theme/theme.ts +158 -156
  95. package/src/utils/format-data/index.ts +14 -14
  96. package/src/utils/mutiply/index.ts +3 -3
@@ -1,43 +1,43 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import * as React from "react";
5
- import Svg, { Path, Defs, G, ClipPath } from "react-native-svg";
6
-
7
- //typings
8
- import { ISvgProps } from "../interface";
9
-
10
- const SvgIconWiFiHigh: React.FC<ISvgProps> = ({ color, size }) => (
11
- <Svg
12
- //@ts-ignore
13
- xmlns="http://www.w3.org/2000/svg"
14
- width={size ?? "25"}
15
- height={size ?? "25"}
16
- fill="none"
17
- viewBox="0 0 25 25"
18
- >
19
- <G clipPath="url(#clip0_912_107)">
20
- <Path
21
- fill={color ?? "#0DEC08"}
22
- d="M12.56 20.767a1.125 1.125 0 100-2.25 1.125 1.125 0 000 2.25z"
23
- ></Path>
24
- <Path
25
- stroke={color ?? "#0DEC08"}
26
- strokeLinecap="round"
27
- strokeLinejoin="round"
28
- strokeWidth="2"
29
- d="M22.31 9.253a15.375 15.375 0 00-19.5 0M19.31 12.61a10.875 10.875 0 00-13.5 0M16.31 15.985a6.375 6.375 0 00-7.5 0"
30
- ></Path>
31
- </G>
32
- <Defs>
33
- <ClipPath id="clip0_912_107">
34
- <Path fill="#fff" d="M0 0H24V24H0z" transform="translate(.56 .517)"></Path>
35
- </ClipPath>
36
- </Defs>
37
- </Svg>
38
- );
39
-
40
- /**
41
- * EXPORTS
42
- */
43
- export { SvgIconWiFiHigh };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import * as React from "react";
5
+ import Svg, { Path, Defs, G, ClipPath } from "react-native-svg";
6
+
7
+ //typings
8
+ import { ISvgProps } from "../interface";
9
+
10
+ const SvgIconWiFiHigh: React.FC<ISvgProps> = ({ color, size }) => (
11
+ <Svg
12
+ //@ts-ignore
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ width={size ?? "25"}
15
+ height={size ?? "25"}
16
+ fill="none"
17
+ viewBox="0 0 25 25"
18
+ >
19
+ <G clipPath="url(#clip0_912_107)">
20
+ <Path
21
+ fill={color ?? "#0DEC08"}
22
+ d="M12.56 20.767a1.125 1.125 0 100-2.25 1.125 1.125 0 000 2.25z"
23
+ ></Path>
24
+ <Path
25
+ stroke={color ?? "#0DEC08"}
26
+ strokeLinecap="round"
27
+ strokeLinejoin="round"
28
+ strokeWidth="2"
29
+ d="M22.31 9.253a15.375 15.375 0 00-19.5 0M19.31 12.61a10.875 10.875 0 00-13.5 0M16.31 15.985a6.375 6.375 0 00-7.5 0"
30
+ ></Path>
31
+ </G>
32
+ <Defs>
33
+ <ClipPath id="clip0_912_107">
34
+ <Path fill="#fff" d="M0 0H24V24H0z" transform="translate(.56 .517)"></Path>
35
+ </ClipPath>
36
+ </Defs>
37
+ </Svg>
38
+ );
39
+
40
+ /**
41
+ * EXPORTS
42
+ */
43
+ export { SvgIconWiFiHigh };
@@ -1,50 +1,50 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import * as React from "react";
5
- import Svg, { Path, Defs, G, ClipPath } from "react-native-svg";
6
-
7
- //typings
8
- import { ISvgProps } from "../interface";
9
-
10
- const SvgIconWiFiX: React.FC<ISvgProps> = ({ color, size }) => (
11
- <Svg
12
- //@ts-ignore
13
- xmlns="http://www.w3.org/2000/svg"
14
- width={size ?? "25"}
15
- height={size ?? "25"}
16
- fill="none"
17
- viewBox="0 0 25 25"
18
- >
19
- <G clipPath="url(#clip0_912_99)">
20
- <Path
21
- stroke={color ?? "#E72626"}
22
- strokeLinecap="round"
23
- strokeLinejoin="round"
24
- strokeWidth="2"
25
- d="M21.56 5.767l-4.5 4.5M21.56 10.267l-4.5-4.5"
26
- ></Path>
27
- <Path
28
- fill={color ?? "#E72626"}
29
- d="M12.56 20.767a1.125 1.125 0 100-2.25 1.125 1.125 0 000 2.25z"
30
- ></Path>
31
- <Path
32
- stroke={color ?? "#E72626"}
33
- strokeLinecap="round"
34
- strokeLinejoin="round"
35
- strokeWidth="2"
36
- d="M16.31 15.985a6.375 6.375 0 00-7.5 0M14.06 5.839a15.433 15.433 0 00-1.5-.072 15.31 15.31 0 00-9.75 3.486M14.06 10.369a11.004 11.004 0 00-1.5-.102c-2.45-.005-4.83.82-6.75 2.343"
37
- ></Path>
38
- </G>
39
- <Defs>
40
- <ClipPath id="clip0_912_99">
41
- <Path fill="#fff" d="M0 0H24V24H0z" transform="translate(.56 .517)"></Path>
42
- </ClipPath>
43
- </Defs>
44
- </Svg>
45
- );
46
-
47
- /**
48
- * EXPORTS
49
- */
50
- export { SvgIconWiFiX };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import * as React from "react";
5
+ import Svg, { Path, Defs, G, ClipPath } from "react-native-svg";
6
+
7
+ //typings
8
+ import { ISvgProps } from "../interface";
9
+
10
+ const SvgIconWiFiX: React.FC<ISvgProps> = ({ color, size }) => (
11
+ <Svg
12
+ //@ts-ignore
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ width={size ?? "25"}
15
+ height={size ?? "25"}
16
+ fill="none"
17
+ viewBox="0 0 25 25"
18
+ >
19
+ <G clipPath="url(#clip0_912_99)">
20
+ <Path
21
+ stroke={color ?? "#E72626"}
22
+ strokeLinecap="round"
23
+ strokeLinejoin="round"
24
+ strokeWidth="2"
25
+ d="M21.56 5.767l-4.5 4.5M21.56 10.267l-4.5-4.5"
26
+ ></Path>
27
+ <Path
28
+ fill={color ?? "#E72626"}
29
+ d="M12.56 20.767a1.125 1.125 0 100-2.25 1.125 1.125 0 000 2.25z"
30
+ ></Path>
31
+ <Path
32
+ stroke={color ?? "#E72626"}
33
+ strokeLinecap="round"
34
+ strokeLinejoin="round"
35
+ strokeWidth="2"
36
+ d="M16.31 15.985a6.375 6.375 0 00-7.5 0M14.06 5.839a15.433 15.433 0 00-1.5-.072 15.31 15.31 0 00-9.75 3.486M14.06 10.369a11.004 11.004 0 00-1.5-.102c-2.45-.005-4.83.82-6.75 2.343"
37
+ ></Path>
38
+ </G>
39
+ <Defs>
40
+ <ClipPath id="clip0_912_99">
41
+ <Path fill="#fff" d="M0 0H24V24H0z" transform="translate(.56 .517)"></Path>
42
+ </ClipPath>
43
+ </Defs>
44
+ </Svg>
45
+ );
46
+
47
+ /**
48
+ * EXPORTS
49
+ */
50
+ export { SvgIconWiFiX };
@@ -1,47 +1,47 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import React from "react";
5
- import { View } from "react-native";
6
-
7
- // typings
8
- import { IBoxProps } from "./interface";
9
-
10
- // styles
11
- import { styles } from "./styles";
12
-
13
- /**
14
- * Componente Box para envolver outros componentes de forma flexível.
15
- */
16
- export const Box: React.FC<IBoxProps> = ({
17
- children,
18
- width,
19
- height,
20
- backgroundColor,
21
- borderStyled,
22
- flexStyle,
23
- paddingStyle,
24
- marginStyle,
25
- opacity = 1,
26
- testID = "box",
27
- style,
28
- }) => {
29
- // Criando o objeto de estilos dinamicamente
30
- const styleProps: Partial<IBoxProps> = {
31
- width,
32
- height,
33
- backgroundColor,
34
- borderStyled,
35
- flexStyle,
36
- paddingStyle,
37
- marginStyle,
38
- opacity,
39
- style,
40
- };
41
-
42
- return (
43
- <View testID={testID} style={[styles(styleProps).boxStyle, style]}>
44
- {children}
45
- </View>
46
- );
47
- };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import React from "react";
5
+ import { View } from "react-native";
6
+
7
+ // typings
8
+ import { IBoxProps } from "./interface";
9
+
10
+ // styles
11
+ import { styles } from "./styles";
12
+
13
+ /**
14
+ * Componente Box para envolver outros componentes de forma flexível.
15
+ */
16
+ export const Box: React.FC<IBoxProps> = ({
17
+ children,
18
+ width,
19
+ height,
20
+ backgroundColor,
21
+ borderStyled,
22
+ flexStyle,
23
+ paddingStyle,
24
+ marginStyle,
25
+ opacity = 1,
26
+ testID = "box",
27
+ style,
28
+ }) => {
29
+ // Criando o objeto de estilos dinamicamente
30
+ const styleProps: Partial<IBoxProps> = {
31
+ width,
32
+ height,
33
+ backgroundColor,
34
+ borderStyled,
35
+ flexStyle,
36
+ paddingStyle,
37
+ marginStyle,
38
+ opacity,
39
+ style,
40
+ };
41
+
42
+ return (
43
+ <View testID={testID} style={[styles(styleProps).boxStyle, style]}>
44
+ {children}
45
+ </View>
46
+ );
47
+ };
@@ -1,31 +1,31 @@
1
- /**
2
- * IMPORTS
3
- */
4
-
5
- import { type ViewProps } from "react-native";
6
- /**
7
- * INTERFACE
8
- */
9
- import { IGlobalCss } from "../../styles/global/interface";
10
-
11
- interface IBoxProps extends ViewProps, IGlobalCss {
12
- /**
13
- * A propriedade CSS de Shadow Box adiciona efeitos de sombra em torno da estrutura de um elemento. Você pode definir vários efeitos separados por vírgulas. Uma sombra de caixa é descrita por compensações x e y em relação ao elemento, borrão e raio espalhado e cor.
14
- */
15
- boxShadow?: string;
16
-
17
- /**
18
- * O fundo abreviado CSS Propriedade define todas as propriedades do estilo de fundo de uma só vez, como cor, imagem, origem e tamanho ou método de repetição. As propriedades dos componentes não definidas no fundo da declaração de valor da propriedade abreviada são definidas como seus valores padrão..
19
- */
20
- backgroundColor?: string;
21
-
22
- /**
23
- * A propriedade CSS opacity define a transparência de um elemento, ou seja, o grau em que o fundo atrás do elemento é sobreposto. A propriedade aceita um valor entre 0,0 (totalmente transparente) e 1,0 (totalmente opaco).
24
- */
25
- opacity?: number;
26
- }
27
-
28
- /**
29
- * EXPORT
30
- */
31
- export type { IBoxProps };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+
5
+ import { type ViewProps } from "react-native";
6
+ /**
7
+ * INTERFACE
8
+ */
9
+ import { IGlobalCss } from "../../styles/global/interface";
10
+
11
+ interface IBoxProps extends ViewProps, IGlobalCss {
12
+ /**
13
+ * A propriedade CSS de Shadow Box adiciona efeitos de sombra em torno da estrutura de um elemento. Você pode definir vários efeitos separados por vírgulas. Uma sombra de caixa é descrita por compensações x e y em relação ao elemento, borrão e raio espalhado e cor.
14
+ */
15
+ boxShadow?: string;
16
+
17
+ /**
18
+ * O fundo abreviado CSS Propriedade define todas as propriedades do estilo de fundo de uma só vez, como cor, imagem, origem e tamanho ou método de repetição. As propriedades dos componentes não definidas no fundo da declaração de valor da propriedade abreviada são definidas como seus valores padrão..
19
+ */
20
+ backgroundColor?: string;
21
+
22
+ /**
23
+ * A propriedade CSS opacity define a transparência de um elemento, ou seja, o grau em que o fundo atrás do elemento é sobreposto. A propriedade aceita um valor entre 0,0 (totalmente transparente) e 1,0 (totalmente opaco).
24
+ */
25
+ opacity?: number;
26
+ }
27
+
28
+ /**
29
+ * EXPORT
30
+ */
31
+ export type { IBoxProps };
@@ -1,21 +1,21 @@
1
- import { StyleSheet, ViewProps } from "react-native";
2
- import { IBoxProps } from "./interface.d";
3
-
4
- // typing
5
- import { IGlobalCss } from "../../styles/global/interface";
6
-
7
- import { stylesGlobal } from "../../styles/global/styles";
8
-
9
- interface BoxProps extends IBoxProps, IGlobalCss {}
10
- const styles = (props: BoxProps) =>
11
- StyleSheet.create({
12
- boxStyle: {
13
- ...stylesGlobal(props),
14
- ...props,
15
- } as ViewProps,
16
- });
17
-
18
- /**
19
- * EXPORTS
20
- */
21
- export { styles };
1
+ import { StyleSheet, ViewProps } from "react-native";
2
+ import { IBoxProps } from "./interface.d";
3
+
4
+ // typing
5
+ import { IGlobalCss } from "../../styles/global/interface";
6
+
7
+ import { stylesGlobal } from "../../styles/global/styles";
8
+
9
+ interface BoxProps extends IBoxProps, IGlobalCss {}
10
+ const styles = (props: BoxProps) =>
11
+ StyleSheet.create({
12
+ boxStyle: {
13
+ ...stylesGlobal(props),
14
+ ...props,
15
+ } as ViewProps,
16
+ });
17
+
18
+ /**
19
+ * EXPORTS
20
+ */
21
+ export { styles };
@@ -1,61 +1,61 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import React from "react";
5
- import { Text, TouchableOpacity, TextStyle } from "react-native";
6
-
7
- // typings
8
- import { type IButtonProps } from "./interface";
9
-
10
- // styles
11
- import { styles } from "./styles";
12
-
13
- /**
14
- * Componente Button para a interação da ui.
15
- */
16
- export const Button: React.FC<IButtonProps> = ({
17
- title = "Button",
18
- width = "50%",
19
- height,
20
- backgroundColor,
21
- borderStyled,
22
- flexStyle,
23
- paddingStyle,
24
- marginStyle,
25
- testID,
26
- opacity = 1,
27
- children,
28
- style,
29
- fontStyle,
30
- buttonTextStyle,
31
- onPress,
32
- ...res
33
- }) => {
34
- const styleProps = {
35
- width,
36
- height,
37
- backgroundColor,
38
- borderStyled,
39
- flexStyle,
40
- paddingStyle,
41
- marginStyle,
42
- testID,
43
- opacity,
44
- children,
45
- fontStyle,
46
- buttonTextStyle,
47
- style,
48
- } as IButtonProps;
49
-
50
- return (
51
- <TouchableOpacity
52
- activeOpacity={0.7}
53
- testID={"button"}
54
- style={styles(styleProps).buttonStyle}
55
- onPress={onPress}
56
- {...res}
57
- >
58
- <Text style={[styles(styleProps).buttonTextStyle as TextStyle]}>{title}</Text>
59
- </TouchableOpacity>
60
- );
61
- };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import React from "react";
5
+ import { Text, Pressable, TextStyle } from "react-native";
6
+
7
+ // typings
8
+ import { type IButtonProps } from "./interface";
9
+
10
+ // styles
11
+ import { styles } from "./styles";
12
+
13
+ /**
14
+ * Componente Button para a interação da ui.
15
+ */
16
+ export const Button: React.FC<IButtonProps> = ({
17
+ title = "Button",
18
+ width = "50%",
19
+ height,
20
+ backgroundColor,
21
+ borderStyled,
22
+ flexStyle,
23
+ paddingStyle,
24
+ marginStyle,
25
+ testID,
26
+ opacity = 1,
27
+ children,
28
+ style,
29
+ fontStyle,
30
+ buttonTextStyle,
31
+ onPress,
32
+ ...res
33
+ }) => {
34
+ const styleProps = {
35
+ width,
36
+ height,
37
+ backgroundColor,
38
+ borderStyled,
39
+ flexStyle,
40
+ paddingStyle,
41
+ marginStyle,
42
+ testID,
43
+ opacity,
44
+ children,
45
+ fontStyle,
46
+ buttonTextStyle,
47
+ style,
48
+ } as IButtonProps;
49
+
50
+ return (
51
+ <Pressable
52
+ activeOpacity={0.7}
53
+ testID={"button"}
54
+ style={({ pressed }) => [styles(styleProps).buttonStyle, { opacity: pressed ? 0.7 : 1.0 }]}
55
+ onPress={onPress}
56
+ {...res}
57
+ >
58
+ <Text style={[styles(styleProps).buttonTextStyle as TextStyle]}>{title}</Text>
59
+ </Pressable>
60
+ );
61
+ };
@@ -1,40 +1,40 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import { type TouchableOpacityProps } from "react-native";
5
-
6
- // typing
7
- import { IGlobalCss } from "../../styles/global/interface";
8
-
9
- interface IButtonProps extends TouchableOpacityProps, Omit<IGlobalCss, "color"> {
10
- title: string;
11
-
12
- /**
13
- * A propriedade CSS de Shadow Box adiciona efeitos de sombra em torno da estrutura de um elemento. Você pode definir vários efeitos separados por vírgulas. Uma sombra de caixa é descrita por compensações x e y em relação ao elemento, borrão e raio espalhado e cor.
14
- */
15
- boxShadow?: string;
16
-
17
- /**
18
- * A propriedade CSS opacity define a transparência de um elemento, ou seja, o grau em que o fundo atrás do elemento é sobreposto. A propriedade aceita um valor entre 0,0 (totalmente transparente) e 1,0 (totalmente opaco).
19
- */
20
- opacity?: number;
21
-
22
- /**
23
- * A propriedade CSS color define o valor da cor de primeiro plano do texto e das decorações de texto de um elemento e define o valor currentcolor. currentcolor pode ser usado como um valor indireto em outras propriedades e é o padrão para outras propriedades de cores, como border-color.
24
- */
25
-
26
- buttonTextStyle: {
27
- color: string;
28
- font?: string;
29
- fontSize?: number;
30
- fontWeight?: "100" | "300" | "400" | "500" | "600" | "700" | "bold";
31
- fontFamily?: string;
32
- letterSpacing?: number;
33
- lineHeight?: number;
34
- };
35
- }
36
-
37
- /**
38
- * EXPORT
39
- */
40
- export type { IButtonProps };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import { type TouchableOpacityProps } from "react-native";
5
+
6
+ // typing
7
+ import { IGlobalCss } from "../../styles/global/interface";
8
+
9
+ interface IButtonProps extends TouchableOpacityProps, Omit<IGlobalCss, "color"> {
10
+ title: string;
11
+
12
+ /**
13
+ * A propriedade CSS de Shadow Box adiciona efeitos de sombra em torno da estrutura de um elemento. Você pode definir vários efeitos separados por vírgulas. Uma sombra de caixa é descrita por compensações x e y em relação ao elemento, borrão e raio espalhado e cor.
14
+ */
15
+ boxShadow?: string;
16
+
17
+ /**
18
+ * A propriedade CSS opacity define a transparência de um elemento, ou seja, o grau em que o fundo atrás do elemento é sobreposto. A propriedade aceita um valor entre 0,0 (totalmente transparente) e 1,0 (totalmente opaco).
19
+ */
20
+ opacity?: number;
21
+
22
+ /**
23
+ * A propriedade CSS color define o valor da cor de primeiro plano do texto e das decorações de texto de um elemento e define o valor currentcolor. currentcolor pode ser usado como um valor indireto em outras propriedades e é o padrão para outras propriedades de cores, como border-color.
24
+ */
25
+
26
+ buttonTextStyle: {
27
+ color: string;
28
+ font?: string;
29
+ fontSize?: number;
30
+ fontWeight?: "100" | "300" | "400" | "500" | "600" | "700" | "bold";
31
+ fontFamily?: string;
32
+ letterSpacing?: number;
33
+ lineHeight?: number;
34
+ };
35
+ }
36
+
37
+ /**
38
+ * EXPORT
39
+ */
40
+ export type { IButtonProps };
@@ -1,34 +1,34 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import { StyleSheet } from "react-native";
5
-
6
- // typings
7
- import { type IButtonProps } from "./interface";
8
- import { IGlobalCss } from "../../styles/global/interface";
9
-
10
- import { stylesGlobal } from "../../styles/global/styles";
11
-
12
- /**
13
- * Interface ButtonProps
14
- */
15
- interface ButtonProps extends Omit<IButtonProps, "color">, Omit<IGlobalCss, "color"> {}
16
-
17
- const styles = (props: ButtonProps) =>
18
- StyleSheet.create({
19
- buttonStyle: { ...stylesGlobal(props), ...props },
20
- buttonTextStyle: {
21
- color: props.buttonTextStyle?.color ?? "blue",
22
- fontSize: props.buttonTextStyle?.fontSize ?? 14,
23
- letterSpacing: props.buttonTextStyle?.letterSpacing ?? 0.5,
24
- lineHeight: props.buttonTextStyle?.lineHeight ?? 24,
25
- fontWeight: props.buttonTextStyle?.fontWeight,
26
- fontFamily: props.buttonTextStyle?.fontFamily ?? "Inter-Medium",
27
- textAlign: props.flexStyle?.textAlign,
28
- },
29
- });
30
-
31
- /**
32
- * EXPORTS
33
- */
34
- export { styles };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import { StyleSheet } from "react-native";
5
+
6
+ // typings
7
+ import { type IButtonProps } from "./interface";
8
+ import { IGlobalCss } from "../../styles/global/interface";
9
+
10
+ import { stylesGlobal } from "../../styles/global/styles";
11
+
12
+ /**
13
+ * Interface ButtonProps
14
+ */
15
+ interface ButtonProps extends Omit<IButtonProps, "color">, Omit<IGlobalCss, "color"> {}
16
+
17
+ const styles = (props: ButtonProps) =>
18
+ StyleSheet.create({
19
+ buttonStyle: { ...stylesGlobal(props), ...props },
20
+ buttonTextStyle: {
21
+ color: props.buttonTextStyle?.color ?? "blue",
22
+ fontSize: props.buttonTextStyle?.fontSize ?? 14,
23
+ letterSpacing: props.buttonTextStyle?.letterSpacing ?? 0.5,
24
+ lineHeight: props.buttonTextStyle?.lineHeight ?? 24,
25
+ fontWeight: props.buttonTextStyle?.fontWeight,
26
+ fontFamily: props.buttonTextStyle?.fontFamily ?? "Inter-Medium",
27
+ textAlign: props.flexStyle?.textAlign,
28
+ },
29
+ });
30
+
31
+ /**
32
+ * EXPORTS
33
+ */
34
+ export { styles };