react-native-exp-fig 0.1.23 → 0.1.25

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 (56) hide show
  1. package/lib/commonjs/components/image-capture-with-remove/index.js +2 -1
  2. package/lib/commonjs/components/image-capture-with-remove/index.js.map +1 -1
  3. package/lib/commonjs/components/image-capture-with-remove/interface.d.js.map +1 -1
  4. package/lib/commonjs/components/modal-change-activity/index.js.map +1 -1
  5. package/lib/commonjs/components/step-indicator/index.js +69 -58
  6. package/lib/commonjs/components/step-indicator/index.js.map +1 -1
  7. package/lib/commonjs/components/step-indicator/interface.d.js.map +1 -1
  8. package/lib/commonjs/components/step-indicator/styles.js +8 -10
  9. package/lib/commonjs/components/step-indicator/styles.js.map +1 -1
  10. package/lib/commonjs/index.js +2 -2
  11. package/lib/commonjs/index.js.map +1 -1
  12. package/lib/commonjs/stories/modal-change-activity/modal-change-activity.stories.js +0 -2
  13. package/lib/commonjs/stories/modal-change-activity/modal-change-activity.stories.js.map +1 -1
  14. package/lib/commonjs/stories/step-indicator/step-indicator.stories.js +13 -7
  15. package/lib/commonjs/stories/step-indicator/step-indicator.stories.js.map +1 -1
  16. package/lib/commonjs/utils/format-date/index.js +54 -0
  17. package/lib/commonjs/utils/format-date/index.js.map +1 -0
  18. package/lib/commonjs/utils/get-icon-by-property/index.js +10 -11
  19. package/lib/commonjs/utils/get-icon-by-property/index.js.map +1 -1
  20. package/lib/module/components/image-capture-with-remove/index.js +2 -1
  21. package/lib/module/components/image-capture-with-remove/index.js.map +1 -1
  22. package/lib/module/components/image-capture-with-remove/interface.d.js.map +1 -1
  23. package/lib/module/components/modal-change-activity/index.js.map +1 -1
  24. package/lib/module/components/step-indicator/index.js +69 -58
  25. package/lib/module/components/step-indicator/index.js.map +1 -1
  26. package/lib/module/components/step-indicator/interface.d.js.map +1 -1
  27. package/lib/module/components/step-indicator/styles.js +8 -10
  28. package/lib/module/components/step-indicator/styles.js.map +1 -1
  29. package/lib/module/index.js +1 -1
  30. package/lib/module/index.js.map +1 -1
  31. package/lib/module/stories/modal-change-activity/modal-change-activity.stories.js +0 -2
  32. package/lib/module/stories/modal-change-activity/modal-change-activity.stories.js.map +1 -1
  33. package/lib/module/stories/step-indicator/step-indicator.stories.js +11 -6
  34. package/lib/module/stories/step-indicator/step-indicator.stories.js.map +1 -1
  35. package/lib/module/utils/format-date/index.js +50 -0
  36. package/lib/module/utils/format-date/index.js.map +1 -0
  37. package/lib/module/utils/get-icon-by-property/index.js +10 -11
  38. package/lib/module/utils/get-icon-by-property/index.js.map +1 -1
  39. package/lib/typescript/src/components/modal-change-activity/index.d.ts +0 -2
  40. package/lib/typescript/src/components/step-indicator/index.d.ts +2 -2
  41. package/lib/typescript/src/components/step-indicator/styles.d.ts +2 -3
  42. package/lib/typescript/src/index.d.ts +1 -1
  43. package/lib/typescript/src/stories/step-indicator/step-indicator.stories.d.ts +1 -1
  44. package/lib/typescript/src/utils/format-date/index.d.ts +24 -0
  45. package/package.json +1 -1
  46. package/src/components/image-capture-with-remove/index.tsx +2 -1
  47. package/src/components/image-capture-with-remove/interface.d.ts +2 -0
  48. package/src/components/modal-change-activity/index.tsx +0 -2
  49. package/src/components/step-indicator/index.tsx +235 -222
  50. package/src/components/step-indicator/interface.d.ts +47 -35
  51. package/src/components/step-indicator/styles.ts +66 -68
  52. package/src/index.ts +1 -1
  53. package/src/stories/modal-change-activity/modal-change-activity.stories.tsx +0 -2
  54. package/src/stories/step-indicator/step-indicator.stories.tsx +159 -154
  55. package/src/utils/format-date/index.ts +58 -0
  56. package/src/utils/get-icon-by-property/index.tsx +65 -67
@@ -1,68 +1,66 @@
1
- /**
2
- * IMPORTS
3
- */
4
-
5
- import { StyleSheet } from "react-native";
6
-
7
- // typings
8
- import { IStepIndicator } from "./interface";
9
-
10
- // styles
11
- import { theme } from "../../styles/theme/theme";
12
-
13
- const styles = (props: IStepIndicator) =>
14
- StyleSheet.create({
15
- containerIndicator: {
16
- width: "100%",
17
- height: 86,
18
- flexDirection: "row",
19
- justifyContent: "flex-start",
20
- // backgroundColor: theme.colors.gray[300],
21
- },
22
- containerBall: {
23
- width: 32,
24
- height: 32,
25
- backgroundColor: props.sincronizado ? theme.colors.blue[500] : theme.colors.orange[150],
26
- flexDirection: "row",
27
- alignItems: "center",
28
- justifyContent: "center",
29
- borderRadius: 16,
30
- },
31
- title: {
32
- color: props.titleColor ?? "black",
33
- textAlign: "center",
34
- lineHeight: 20,
35
- fontSize: theme.fontSizes["sm"],
36
- fontWeight: "500",
37
- marginLeft: 8,
38
- },
39
- titleNumber: {
40
- color: props.titleNumberColor ?? theme.colors.neutral[25],
41
- textAlign: "center",
42
- lineHeight: 16,
43
- fontFamily: theme.fonts.inter_regular_400,
44
- fontSize: theme.fontSizes["xs"],
45
- position: "absolute",
46
- },
47
- titleDescription: {
48
- color: props.textColorDescription ?? theme.colors.gray[700],
49
- textAlign: "center",
50
- lineHeight: 16,
51
- fontSize: theme.fontSizes["xs"],
52
- fontFamily: theme.fonts.inter_regular_400,
53
- fontWeight: "400",
54
- marginLeft: 8,
55
- },
56
- containerMain: {
57
- width: "100%",
58
- height: 56,
59
- flexDirection: "column",
60
- alignItems: "flex-start",
61
- marginLeft: 2,
62
- },
63
- });
64
-
65
- /**
66
- * EXPORTS
67
- */
68
- export { styles };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+
5
+ import { StyleSheet } from "react-native";
6
+
7
+ // typings
8
+ import { type IStyleProps } from "./interface";
9
+
10
+ // styles
11
+ import { theme } from "../../styles/theme/theme";
12
+
13
+ const styles = (props: IStyleProps) =>
14
+ StyleSheet.create({
15
+ containerIndicator: {
16
+ width: "100%",
17
+ height: 86,
18
+ flexDirection: "row",
19
+ justifyContent: "flex-start",
20
+ },
21
+ containerBall: {
22
+ width: 32,
23
+ height: 32,
24
+ backgroundColor: props.sincronizado ? theme.colors.blue[500] : theme.colors.orange[150],
25
+ flexDirection: "row",
26
+ alignItems: "center",
27
+ justifyContent: "center",
28
+ borderRadius: 16,
29
+ },
30
+ title: {
31
+ color: props.titleColor ?? "black",
32
+ textAlign: "center",
33
+ lineHeight: 24,
34
+ fontSize: theme.fontSizes["sm"],
35
+ fontWeight: "500",
36
+ marginLeft: 8,
37
+ },
38
+ titleNumber: {
39
+ color: props.titleNumberColor ?? theme.colors.neutral[25],
40
+ textAlign: "center",
41
+ lineHeight: 18,
42
+ fontFamily: theme.fonts.inter_regular_400,
43
+ fontSize: theme.fontSizes["xs"],
44
+ position: "absolute",
45
+ },
46
+ titleDescription: {
47
+ color: props.textColorDescription ?? theme.colors.gray[700],
48
+ textAlign: "center",
49
+ lineHeight: 16,
50
+ fontSize: 12,
51
+ fontFamily: theme.fonts.inter_light_300,
52
+ marginLeft: 8,
53
+ },
54
+ containerMain: {
55
+ width: "100%",
56
+ height: 56,
57
+ flexDirection: "column",
58
+ alignItems: "flex-start",
59
+ marginLeft: 2,
60
+ },
61
+ });
62
+
63
+ /**
64
+ * EXPORTS
65
+ */
66
+ export { styles };
package/src/index.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  // Components
6
6
  export { default as Box } from "./components/box";
7
7
  export { Button } from "./components/button";
8
- export { StepIndicator } from "./components/step-indicator";
8
+ export { default as StepIndicator } from "./components/step-indicator";
9
9
  export { Typography } from "./components/typography";
10
10
  export { Input } from "./components/input";
11
11
  export { CapturePhoto } from "./components/capture-photo";
@@ -12,9 +12,7 @@ const meta: Meta<typeof ModalChangeActivity> = {
12
12
  component: ModalChangeActivity,
13
13
  args: {
14
14
  visible: true,
15
- dataRegistro: "07/03/2024",
16
15
  descricao: "Repouso Noturno",
17
- imagemUrl: "https://via.placeholder.com/150",
18
16
  onClose: () => {},
19
17
  modalConfirm: () => {},
20
18
  },
@@ -1,154 +1,159 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
-
3
- // components
4
- import { StepIndicator } from "../../components/step-indicator";
5
-
6
- // styles
7
- import { theme } from "../../styles/theme/theme";
8
-
9
- const meta: Meta<typeof StepIndicator> = {
10
- title: "Componente/StepIndicator",
11
- component: StepIndicator,
12
- args: {
13
- data: [
14
- {
15
- id: 1,
16
- descricao: "Repouso Noturno",
17
- data_inicio: "07/03/2024 14:52",
18
- data_fim: "07/03/2024 17:52",
19
- duracao_segundos: "3601",
20
- sincronizado: true,
21
- },
22
- ],
23
- titleColor: theme.colors.neutral[25],
24
- titleNumberColor: theme.colors.neutral[25],
25
- },
26
- parameters: {
27
- notes: `
28
- # StepIndicator
29
-
30
- Este é um componente de step indicator.
31
- Você usa assim:
32
- \`\`\`tsx
33
- <StepIndicator
34
- type="default"
35
- data={dataMock}
36
- />
37
- \`\`\`
38
- `,
39
- },
40
- };
41
-
42
- export default meta;
43
-
44
- type Story = StoryObj<typeof meta>;
45
-
46
- const dataMock = [
47
- {
48
- id: 1,
49
- descricao: "Repouso Noturno",
50
- data_inicio: "07/03/2024 14:52",
51
- data_fim: "07/03/2024 17:52",
52
- duracao_segundos: "3601",
53
- sincronizado: true,
54
- },
55
- {
56
- id: 2,
57
- descricao: "Descarga",
58
- data_inicio: "06/03/2024 14:52",
59
- data_fim: "06/03/2024 16:52",
60
- duracao_segundos: "7200",
61
- sincronizado: true,
62
- },
63
- ];
64
- const dataMockFalse = [
65
- {
66
- id: 1,
67
- descricao: "Repouso Noturno",
68
- data_inicio: "07/03/2024 14:52",
69
- data_fim: "07/03/2024 17:52",
70
- duracao_segundos: "3601",
71
- sincronizado: false,
72
- },
73
- {
74
- id: 2,
75
- descricao: "Descarga",
76
- data_inicio: "06/03/2024 14:52",
77
- data_fim: "06/03/2024 16:52",
78
- duracao_segundos: "7200",
79
- sincronizado: false,
80
- },
81
- ];
82
-
83
- const dataMockCustom = [
84
- {
85
- id: 1,
86
- descricao: "Pedido Realizado",
87
- data_inicio: "",
88
- data_fim: "",
89
- duracao_segundos: "",
90
- },
91
- {
92
- id: 2,
93
- descricao: "Pagamento Aprovado",
94
- data_inicio: "07/03/2024 14:52",
95
- data_fim: "07/03/2024 17:52",
96
- duracao_segundos: "3601",
97
- },
98
- {
99
- id: 3,
100
- descricao: "Pedido Faturado",
101
- data_inicio: "",
102
- data_fim: "",
103
- duracao_segundos: "",
104
- },
105
- {
106
- id: 4,
107
- descricao: "Pedido Enviado",
108
- data_inicio: "",
109
- data_fim: "",
110
- duracao_segundos: "",
111
- },
112
- {
113
- id: 4,
114
- descricao: "Pedido Entregue",
115
- data_inicio: "07/03/2024 14:52",
116
- data_fim: "07/03/2024 17:52",
117
- duracao_segundos: "3601",
118
- },
119
- ];
120
-
121
- export const StepIndicatorDefault: Story = {
122
- name: "step-indicator-default",
123
- args: {
124
- data: dataMock,
125
- type: "default",
126
- sincronizado: true,
127
- titleColor: theme.colors.neutral[25],
128
- textColorDescription: theme.colors.gray[300],
129
- titleNumberColor: theme.colors.neutral[25],
130
- },
131
- };
132
- export const StepIndicatorSincronizadoFalse: Story = {
133
- name: "step-indicator-sincronizado-false",
134
- args: {
135
- data: dataMockFalse,
136
- type: "default",
137
- sincronizado: false,
138
- titleColor: theme.colors.neutral[25],
139
- textColorDescription: theme.colors.gray[300],
140
- titleNumberColor: theme.colors.neutral[25],
141
- },
142
- };
143
-
144
- export const StepIndicationCustom: Story = {
145
- name: "step-indicator-custom",
146
- args: {
147
- data: dataMockCustom,
148
- type: "custom",
149
- backgroundColorBall: theme.colors.orange[150],
150
- titleColor: theme.colors.blue[500],
151
- textColorDescription: theme.colors.gray[300],
152
- titleNumberColor: theme.colors.neutral[25],
153
- },
154
- };
1
+ import { Meta, StoryObj } from "@storybook/react";
2
+
3
+ // components
4
+ import StepIndicator from "../../components/step-indicator";
5
+
6
+ // styles
7
+ import { theme } from "../../styles/theme/theme";
8
+
9
+ const meta: Meta<typeof StepIndicator> = {
10
+ title: "Componente/StepIndicator",
11
+ component: StepIndicator,
12
+ args: {
13
+ data: [
14
+ {
15
+ jr_tipo_atividade_id: 1,
16
+ descricao: "Repouso Noturno",
17
+ data_inicio: "07/03/2024 14:52",
18
+ data_fim: "07/03/2024 17:52",
19
+ duracao_segundos: "3601",
20
+ sincronizado: true,
21
+ referencia: "repouso_notuno",
22
+ tipo: "descanso",
23
+ },
24
+ ],
25
+ titleColor: theme.colors.neutral[25],
26
+ titleNumberColor: theme.colors.neutral[25],
27
+ },
28
+ parameters: {
29
+ notes: `
30
+ # StepIndicator
31
+
32
+ Este é um componente de step indicator.
33
+ Você usa assim:
34
+ \`\`\`tsx
35
+ <StepIndicator
36
+ type="default"
37
+ data={dataMock}
38
+ onChangeActivity={(activity) => {
39
+ console.log("Atividade selecionada:", activity);
40
+ }}
41
+ />
42
+ \`\`\`
43
+ `,
44
+ },
45
+ };
46
+
47
+ export default meta;
48
+
49
+ type Story = StoryObj<typeof meta>;
50
+
51
+ const dataMock = [
52
+ {
53
+ id: 1,
54
+ descricao: "Repouso Noturno",
55
+ data_inicio: "07/03/2024 14:52",
56
+ data_fim: "07/03/2024 17:52",
57
+ duracao_segundos: "3601",
58
+ sincronizado: true,
59
+ },
60
+ {
61
+ id: 2,
62
+ descricao: "Descarga",
63
+ data_inicio: "06/03/2024 14:52",
64
+ data_fim: "06/03/2024 16:52",
65
+ duracao_segundos: "7200",
66
+ sincronizado: true,
67
+ },
68
+ ];
69
+ const dataMockFalse = [
70
+ {
71
+ id: 1,
72
+ descricao: "Repouso Noturno",
73
+ data_inicio: "07/03/2024 14:52",
74
+ data_fim: "07/03/2024 17:52",
75
+ duracao_segundos: "3601",
76
+ sincronizado: false,
77
+ },
78
+ {
79
+ id: 2,
80
+ descricao: "Descarga",
81
+ data_inicio: "06/03/2024 14:52",
82
+ data_fim: "06/03/2024 16:52",
83
+ duracao_segundos: "7200",
84
+ sincronizado: false,
85
+ },
86
+ ];
87
+
88
+ const dataMockCustom = [
89
+ {
90
+ id: 1,
91
+ descricao: "Pedido Realizado",
92
+ data_inicio: "",
93
+ data_fim: "",
94
+ duracao_segundos: "",
95
+ },
96
+ {
97
+ id: 2,
98
+ descricao: "Pagamento Aprovado",
99
+ data_inicio: "07/03/2024 14:52",
100
+ data_fim: "07/03/2024 17:52",
101
+ duracao_segundos: "3601",
102
+ },
103
+ {
104
+ id: 3,
105
+ descricao: "Pedido Faturado",
106
+ data_inicio: "",
107
+ data_fim: "",
108
+ duracao_segundos: "",
109
+ },
110
+ {
111
+ id: 4,
112
+ descricao: "Pedido Enviado",
113
+ data_inicio: "",
114
+ data_fim: "",
115
+ duracao_segundos: "",
116
+ },
117
+ {
118
+ id: 4,
119
+ descricao: "Pedido Entregue",
120
+ data_inicio: "07/03/2024 14:52",
121
+ data_fim: "07/03/2024 17:52",
122
+ duracao_segundos: "3601",
123
+ },
124
+ ];
125
+
126
+ export const StepIndicatorDefault: Story = {
127
+ name: "step-indicator-default",
128
+ args: {
129
+ data: dataMock,
130
+ type: "default",
131
+ sincronizado: true,
132
+ titleColor: theme.colors.neutral[25],
133
+ textColorDescription: theme.colors.gray[300],
134
+ titleNumberColor: theme.colors.neutral[25],
135
+ },
136
+ };
137
+ export const StepIndicatorSincronizadoFalse: Story = {
138
+ name: "step-indicator-sincronizado-false",
139
+ args: {
140
+ data: dataMockFalse,
141
+ type: "default",
142
+ sincronizado: false,
143
+ titleColor: theme.colors.neutral[25],
144
+ textColorDescription: theme.colors.gray[300],
145
+ titleNumberColor: theme.colors.neutral[25],
146
+ },
147
+ };
148
+
149
+ export const StepIndicationCustom: Story = {
150
+ name: "step-indicator-custom",
151
+ args: {
152
+ data: dataMockCustom,
153
+ type: "custom",
154
+ backgroundColorBall: theme.colors.orange[150],
155
+ titleColor: theme.colors.blue[500],
156
+ textColorDescription: theme.colors.gray[300],
157
+ titleNumberColor: theme.colors.neutral[25],
158
+ },
159
+ };
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Formata uma data do tipo Date para o formato DD/MM/YYYY
3
+ * @param date Objeto Date a ser formatado
4
+ * @returns String no formato DD/MM/YYYY
5
+ */
6
+ const formatDate = (date: Date): string => {
7
+ const day = String(date.getDate()).padStart(2, "0");
8
+ const month = String(date.getMonth() + 1).padStart(2, "0"); // Mês começa em 0
9
+ const year = date.getFullYear();
10
+
11
+ return `${day}/${month}/${year}`;
12
+ };
13
+
14
+ export { formatDate };
15
+
16
+ /**
17
+ * Formata uma data do tipo Date para o formato DD/MM/YYYY
18
+ * @param date Objeto Date a ser formatado
19
+ * @returns String no formato DD/MM/YYYY
20
+ */
21
+ const formHoursMinute = (segundos: string): string => {
22
+ const totalSegundos = parseInt(segundos, 10);
23
+ const horas = Math.floor(totalSegundos / 3600);
24
+ const minutos = Math.floor((totalSegundos % 3600) / 60);
25
+
26
+ const horasFormatadas = String(horas).padStart(2, "0");
27
+ const minutosFormatados = String(minutos).padStart(2, "0");
28
+
29
+ return `${horasFormatadas}:${minutosFormatados}`;
30
+ };
31
+
32
+ export { formHoursMinute };
33
+
34
+ /**
35
+ * Retorna as sete últimas datas do dias
36
+ * @returns Array<{ date: number, dayName: string, fullDate: Date }>
37
+ */
38
+
39
+ const getLastSevenDays = () => {
40
+ const today = new Date();
41
+ const days = [];
42
+ const dayNames = ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"];
43
+
44
+ for (let i = 7; i >= 0; i--) {
45
+ const date = new Date(today);
46
+ date.setDate(today.getDate() - i);
47
+
48
+ days.push({
49
+ date: date.getDate(),
50
+ dayName: dayNames[date.getDay()],
51
+ fullDate: date,
52
+ });
53
+ }
54
+
55
+ return days;
56
+ };
57
+
58
+ export { getLastSevenDays };
@@ -1,67 +1,65 @@
1
- /**
2
- * IMPORTS
3
- */
4
-
5
- import React from "react";
6
- import { Icons } from "../../common/icons-svg";
7
- import { theme } from "../../styles/theme/theme";
8
-
9
- export type PropertyType =
10
- | "operacao_veiculo"
11
- | "manutencao"
12
- | "aguardando_carga"
13
- | "disposicao_veiculo_parado"
14
- | "aguardando_descarga"
15
- | "descanso"
16
- | "repouso_semanal"
17
- | "repouso_noturno"
18
- | "refeicao"
19
- | "ferias";
20
-
21
- /**
22
- * Function that will map property types to corresponding icons in SVG 🛠️.
23
- * @param propertyType
24
- * @param color
25
- * @returns SVG
26
- */
27
- const getIconByProperty = (propertyType: PropertyType, color?: string): React.ReactNode => {
28
- switch (propertyType) {
29
-
30
- case "operacao_veiculo":
31
- return <Icons color={color} icon="STEERING_WHEEL" />;
32
-
33
- case "manutencao":
34
- return <Icons color={color} icon="GEAR" />;
35
-
36
- case "aguardando_carga":
37
- return <Icons color={color} icon="TIMER" />;
38
-
39
- case "disposicao_veiculo_parado":
40
- return <Icons color={theme.colors.blue[500]} size={20} icon="TRUCK_ACTIVITY" />;
41
-
42
- case "aguardando_descarga":
43
- return <Icons color={color} icon="HOURGLASS" />;
44
-
45
- case "descanso":
46
- return <Icons color={color} icon="COFFEE" />;
47
-
48
- case "repouso_semanal":
49
- return <Icons color={color} icon="HOUSE" />;
50
-
51
- case "repouso_noturno":
52
- return <Icons color={color} icon="MOON_STARS" />;
53
-
54
- case "refeicao":
55
- return <Icons color={color} icon="CALL_BELL" />;
56
-
57
- case "ferias":
58
- return <Icons color={color} icon="ISLAND" />;
59
- default:
60
- return <Icons color={color} icon="STEERING_WHEEL" />; // Retorna uma Svg default caso o tipo de propriedade não for reconhecido.
61
- }
62
- };
63
-
64
- /**
65
- * EXPORTS
66
- */
67
- export { getIconByProperty };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+
5
+ import React from "react";
6
+ import { Icons } from "../../common/icons-svg";
7
+
8
+ export type PropertyType =
9
+ | "operacao_veiculo"
10
+ | "manutencao"
11
+ | "aguardando_carga"
12
+ | "disposicao_veiculo_parado"
13
+ | "aguardando_descarga"
14
+ | "descanso"
15
+ | "repouso_semanal"
16
+ | "repouso_noturno"
17
+ | "refeicao"
18
+ | "ferias";
19
+
20
+ /**
21
+ * Function that will map property types to corresponding icons in SVG 🛠️.
22
+ * @param propertyType
23
+ * @param color
24
+ * @returns SVG
25
+ */
26
+ const getIconByProperty = (propertyType: PropertyType, color?: string): React.ReactNode => {
27
+ switch (propertyType) {
28
+ case "operacao_veiculo":
29
+ return <Icons color={color} icon="STEERING_WHEEL" />;
30
+
31
+ case "manutencao":
32
+ return <Icons color={color} icon="GEAR" />;
33
+
34
+ case "aguardando_carga":
35
+ return <Icons color={color} icon="TIMER" />;
36
+
37
+ case "disposicao_veiculo_parado":
38
+ return <Icons color={color} size={20} icon="TRUCK_ACTIVITY" />;
39
+
40
+ case "aguardando_descarga":
41
+ return <Icons color={color} icon="HOURGLASS" />;
42
+
43
+ case "descanso":
44
+ return <Icons color={color} icon="COFFEE" />;
45
+
46
+ case "repouso_semanal":
47
+ return <Icons color={color} icon="HOUSE" />;
48
+
49
+ case "repouso_noturno":
50
+ return <Icons color={color} icon="MOON_STARS" />;
51
+
52
+ case "refeicao":
53
+ return <Icons color={color} icon="CALL_BELL" />;
54
+
55
+ case "ferias":
56
+ return <Icons color={color} icon="ISLAND" />;
57
+ default:
58
+ return <Icons color={color} icon="STEERING_WHEEL" />; // Retorna uma Svg default caso o tipo de propriedade não for reconhecido.
59
+ }
60
+ };
61
+
62
+ /**
63
+ * EXPORTS
64
+ */
65
+ export { getIconByProperty };