react-native-exp-fig 2.0.0 → 2.0.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.
- package/lib/commonjs/components/box/index.js +4 -4
- package/lib/commonjs/components/card-loading/index.js +26 -24
- package/lib/commonjs/components/card-loading/index.js.map +1 -1
- package/lib/commonjs/components/header-profile/index.js +69 -63
- package/lib/commonjs/components/header-profile/index.js.map +1 -1
- package/lib/commonjs/components/history-details/index.js +4 -4
- package/lib/commonjs/components/notification-card/index.js +12 -7
- package/lib/commonjs/components/notification-card/index.js.map +1 -1
- package/lib/commonjs/components/user-profile/index.js +9 -10
- package/lib/commonjs/components/user-profile/index.js.map +1 -1
- package/lib/commonjs/index.js +3 -3
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/stories/header-profile/header-profile.stories.js +7 -17
- package/lib/commonjs/stories/header-profile/header-profile.stories.js.map +1 -1
- package/lib/commonjs/stories/notification-card/notification-card.stories.js +200 -0
- package/lib/commonjs/stories/notification-card/notification-card.stories.js.map +1 -0
- package/lib/commonjs/stories/notification-loading/notification-loading.stories.js.map +1 -1
- package/lib/commonjs/styles/theme/theme.js +5 -5
- package/lib/commonjs/utils/status-color/return-color.js +2 -2
- package/lib/commonjs/utils/status-color/return-color.js.map +1 -1
- package/lib/module/components/box/index.js +4 -4
- package/lib/module/components/card-loading/index.js +27 -25
- package/lib/module/components/card-loading/index.js.map +1 -1
- package/lib/module/components/header-profile/index.js +68 -62
- package/lib/module/components/header-profile/index.js.map +1 -1
- package/lib/module/components/history-details/index.js +4 -4
- package/lib/module/components/notification-card/index.js +12 -7
- package/lib/module/components/notification-card/index.js.map +1 -1
- package/lib/module/components/user-profile/index.js +9 -10
- package/lib/module/components/user-profile/index.js.map +1 -1
- package/lib/module/index.js +3 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/stories/header-profile/header-profile.stories.js +5 -16
- package/lib/module/stories/header-profile/header-profile.stories.js.map +1 -1
- package/lib/module/stories/notification-card/notification-card.stories.js +194 -0
- package/lib/module/stories/notification-card/notification-card.stories.js.map +1 -0
- package/lib/module/stories/notification-loading/notification-loading.stories.js.map +1 -1
- package/lib/module/styles/theme/theme.js +5 -5
- package/lib/module/utils/status-color/return-color.js +2 -2
- package/lib/module/utils/status-color/return-color.js.map +1 -1
- package/lib/typescript/src/components/card-loading/index.d.ts.map +1 -1
- package/lib/typescript/src/components/header-profile/index.d.ts +66 -5
- package/lib/typescript/src/components/header-profile/index.d.ts.map +1 -1
- package/lib/typescript/src/components/notification-card/index.d.ts.map +1 -1
- package/lib/typescript/src/components/notification-card/interface.d.ts +2 -1
- package/lib/typescript/src/components/notification-card/interface.d.ts.map +1 -1
- package/lib/typescript/src/components/user-profile/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/stories/header-profile/header-profile.stories.d.ts +1 -1
- package/lib/typescript/src/stories/header-profile/header-profile.stories.d.ts.map +1 -1
- package/lib/typescript/src/stories/notification-card/notification-card.stories.d.ts +14 -0
- package/lib/typescript/src/stories/notification-card/notification-card.stories.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/box/index.tsx +49 -49
- package/src/components/card-loading/index.tsx +294 -290
- package/src/components/header-profile/index.tsx +148 -132
- package/src/components/header-profile/interface.d.ts +145 -57
- package/src/components/history-details/index.tsx +99 -99
- package/src/components/notification-card/index.tsx +127 -123
- package/src/components/notification-card/interface.ts +19 -18
- package/src/components/user-profile/index.tsx +206 -204
- package/src/index.ts +48 -48
- package/src/stories/header-profile/header-profile.stories.tsx +92 -103
- package/src/stories/notification-card/notification-card.stories.tsx +202 -0
- package/src/stories/notification-loading/notification-loading.stories.tsx +88 -88
- package/src/styles/theme/theme.ts +193 -193
- package/src/utils/status-color/return-color.ts +34 -34
|
@@ -1,103 +1,92 @@
|
|
|
1
|
-
import type { StoryObj, Meta } from "@storybook/react";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof Header> = {
|
|
5
|
-
title: "componente/Header",
|
|
6
|
-
component: Header,
|
|
7
|
-
args: {
|
|
8
|
-
testID: "header",
|
|
9
|
-
arrow: false,
|
|
10
|
-
title: "aqui",
|
|
11
|
-
handleNavigation: () => {},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
testID: "header",
|
|
94
|
-
arrow: true,
|
|
95
|
-
title: "texto grande e background diferente",
|
|
96
|
-
handleNavigation: () => {},
|
|
97
|
-
permission: false,
|
|
98
|
-
bluetoothIsConnected: true,
|
|
99
|
-
isInternetReachable: true,
|
|
100
|
-
isBluetooth: false,
|
|
101
|
-
color: { colorText: "white" },
|
|
102
|
-
},
|
|
103
|
-
};
|
|
1
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
2
|
+
import Header from "../../components/header-profile";
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof Header> = {
|
|
5
|
+
title: "componente/Header",
|
|
6
|
+
component: Header,
|
|
7
|
+
args: {
|
|
8
|
+
testID: "header",
|
|
9
|
+
arrow: false,
|
|
10
|
+
title: "aqui",
|
|
11
|
+
handleNavigation: () => { },
|
|
12
|
+
bluetoothIsConnected: false,
|
|
13
|
+
isInternetReachable: true,
|
|
14
|
+
},
|
|
15
|
+
parameters: {
|
|
16
|
+
notes: `
|
|
17
|
+
# Header
|
|
18
|
+
|
|
19
|
+
Este é um componente de Card de horas.
|
|
20
|
+
Você usa assim:
|
|
21
|
+
\`\`\`tsx
|
|
22
|
+
<Header
|
|
23
|
+
|
|
24
|
+
/>
|
|
25
|
+
\`\`\`
|
|
26
|
+
`,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default meta;
|
|
31
|
+
|
|
32
|
+
type Story = StoryObj<typeof meta>;
|
|
33
|
+
|
|
34
|
+
export const HeaderLogin: Story = {
|
|
35
|
+
name: "header-login",
|
|
36
|
+
args: {
|
|
37
|
+
testID: "header",
|
|
38
|
+
arrow: false,
|
|
39
|
+
title: "Login",
|
|
40
|
+
handleNavigation: () => { },
|
|
41
|
+
bluetoothIsConnected: false,
|
|
42
|
+
isInternetReachable: true,
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
export const HeaderArrow: Story = {
|
|
46
|
+
name: "header-arrow",
|
|
47
|
+
args: {
|
|
48
|
+
testID: "header",
|
|
49
|
+
arrow: true,
|
|
50
|
+
title: "SINCRONIZAR ATIVIDADES",
|
|
51
|
+
handleNavigation: () => { },
|
|
52
|
+
bluetoothIsConnected: false,
|
|
53
|
+
isInternetReachable: false,
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const HeaderList: Story = {
|
|
58
|
+
name: "header-list",
|
|
59
|
+
args: {
|
|
60
|
+
testID: "header",
|
|
61
|
+
arrow: true,
|
|
62
|
+
title: "Controle de Jornada",
|
|
63
|
+
handleNavigation: () => { },
|
|
64
|
+
bluetoothIsConnected: true,
|
|
65
|
+
isInternetReachable: true,
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const HeaderPermission: Story = {
|
|
70
|
+
name: "header-permission",
|
|
71
|
+
args: {
|
|
72
|
+
testID: "header",
|
|
73
|
+
arrow: true,
|
|
74
|
+
title: "Permission",
|
|
75
|
+
handleNavigation: () => { },
|
|
76
|
+
bluetoothIsConnected: true,
|
|
77
|
+
isInternetReachable: true,
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const HeaderBackground: Story = {
|
|
82
|
+
name: "header-background",
|
|
83
|
+
args: {
|
|
84
|
+
testID: "header",
|
|
85
|
+
arrow: true,
|
|
86
|
+
title: "texto grande e background diferente",
|
|
87
|
+
handleNavigation: () => { },
|
|
88
|
+
bluetoothIsConnected: true,
|
|
89
|
+
isInternetReachable: true,
|
|
90
|
+
color: { colorText: "white" },
|
|
91
|
+
},
|
|
92
|
+
};
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/* eslint-disable no-undef */
|
|
2
|
+
/**
|
|
3
|
+
* IMPORTS
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import React from "react";
|
|
7
|
+
import { View } from "react-native";
|
|
8
|
+
|
|
9
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
10
|
+
|
|
11
|
+
// components
|
|
12
|
+
import NotificationCard from "../../components/notification-card";
|
|
13
|
+
import { Box } from "../../components/box";
|
|
14
|
+
import { Typography } from "../../components/typography";
|
|
15
|
+
|
|
16
|
+
// styles
|
|
17
|
+
import { theme } from "../../styles/theme/theme";
|
|
18
|
+
|
|
19
|
+
const meta: Meta<typeof NotificationCard> = {
|
|
20
|
+
title: "componente/NotificationCard",
|
|
21
|
+
component: NotificationCard as React.FC,
|
|
22
|
+
args: {
|
|
23
|
+
variant: "read",
|
|
24
|
+
title: "Notificação",
|
|
25
|
+
description: "Descrição da notificação",
|
|
26
|
+
actionLabel: undefined,
|
|
27
|
+
onPress: () => {
|
|
28
|
+
console.log("Notificação clicada-1");
|
|
29
|
+
},
|
|
30
|
+
onPressAction: () => {
|
|
31
|
+
console.log("Notificação clicada-2");
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
parameters: {
|
|
35
|
+
notes: `
|
|
36
|
+
# NotificationCard
|
|
37
|
+
|
|
38
|
+
Este é um componente de Card de notificação.
|
|
39
|
+
Você usa assim:
|
|
40
|
+
\`\`\`tsx
|
|
41
|
+
<NotificationCard
|
|
42
|
+
variant="read" | "unread"
|
|
43
|
+
title="Título"
|
|
44
|
+
description="String ou ReactNode"
|
|
45
|
+
actionLabel="Label da ação"
|
|
46
|
+
onPress={() => {}}
|
|
47
|
+
onPressAction={() => {}}
|
|
48
|
+
/>
|
|
49
|
+
\`\`\`
|
|
50
|
+
|
|
51
|
+
## Props
|
|
52
|
+
|
|
53
|
+
- **variant**: Define o estilo de variante da notificação ('read' ou 'unread')
|
|
54
|
+
- **title**: Título da notificação (string obrigatória)
|
|
55
|
+
- **description**: Descrição (string ou ReactNode)
|
|
56
|
+
- **actionLabel**: Label do botão de ação (opcional)
|
|
57
|
+
- **onPress**: Função chamada ao clicar na notificação
|
|
58
|
+
- **onPressAction**: Função chamada ao clicar no botão de ação
|
|
59
|
+
- **testID**: ID para testes (opcional)
|
|
60
|
+
`,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export default meta;
|
|
65
|
+
|
|
66
|
+
type Story = StoryObj<typeof meta>;
|
|
67
|
+
|
|
68
|
+
export const Default: Story = {
|
|
69
|
+
name: "Notificação Lida",
|
|
70
|
+
args: {
|
|
71
|
+
variant: "read",
|
|
72
|
+
title: "Formulário Enviado",
|
|
73
|
+
description: "Seu formulário foi enviado com sucesso e está em análise.",
|
|
74
|
+
onPress: () => {
|
|
75
|
+
console.log("Notificação clicada-1");
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const Unread: Story = {
|
|
81
|
+
name: "Notificação Não Lida",
|
|
82
|
+
args: {
|
|
83
|
+
variant: "unread",
|
|
84
|
+
title: "Nova Mensagem",
|
|
85
|
+
description: "Você tem uma nova mensagem aguardando sua resposta.",
|
|
86
|
+
onPress: () => {
|
|
87
|
+
console.log("Notificação clicada-2");
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const WithAction: Story = {
|
|
93
|
+
name: "Com Botão de Ação",
|
|
94
|
+
args: {
|
|
95
|
+
variant: "read",
|
|
96
|
+
title: "Documento Expirado",
|
|
97
|
+
description: "Seu documento está expirado e precisa ser renovado urgentemente.",
|
|
98
|
+
actionLabel: "Renovar Agora",
|
|
99
|
+
onPress: () => {
|
|
100
|
+
console.log("Notificação clicada-3");
|
|
101
|
+
},
|
|
102
|
+
onPressAction: () => {
|
|
103
|
+
console.log("Notificação clicada-4");
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export const WithReactNodeDescription: Story = {
|
|
109
|
+
name: "Com React Node na Descrição",
|
|
110
|
+
args: {
|
|
111
|
+
variant: "read",
|
|
112
|
+
title: "Status da Entrega",
|
|
113
|
+
description: (
|
|
114
|
+
<Box>
|
|
115
|
+
<Typography
|
|
116
|
+
text="Sua entrega está a caminho!"
|
|
117
|
+
size={theme.fontSizes.sm}
|
|
118
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
119
|
+
color={theme.colors.gray[700]}
|
|
120
|
+
marginBottom={8}
|
|
121
|
+
/>
|
|
122
|
+
<Box
|
|
123
|
+
flexStyle={{ flexDirection: "row", alignItems: "center" }}
|
|
124
|
+
marginStyle={{ marginTop: 8 }}
|
|
125
|
+
>
|
|
126
|
+
<View
|
|
127
|
+
style={{
|
|
128
|
+
width: 12,
|
|
129
|
+
height: 12,
|
|
130
|
+
borderRadius: 6,
|
|
131
|
+
backgroundColor: theme.colors.green[500],
|
|
132
|
+
marginRight: 8,
|
|
133
|
+
}}
|
|
134
|
+
/>
|
|
135
|
+
<Typography
|
|
136
|
+
text="Previsão: Hoje às 14:00"
|
|
137
|
+
size={theme.fontSizes.xs}
|
|
138
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
139
|
+
color={theme.colors.green[500]}
|
|
140
|
+
/>
|
|
141
|
+
</Box>
|
|
142
|
+
</Box>
|
|
143
|
+
),
|
|
144
|
+
onPress: () => {
|
|
145
|
+
console.log("Notificação clicada-5");
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export const WithComplexReactNode: Story = {
|
|
151
|
+
name: "Com React Node Complexo",
|
|
152
|
+
args: {
|
|
153
|
+
variant: "unread",
|
|
154
|
+
title: "Alerta de Segurança",
|
|
155
|
+
description: (
|
|
156
|
+
<Box>
|
|
157
|
+
<Typography
|
|
158
|
+
text="Uma atividade suspeita foi detectada"
|
|
159
|
+
size={theme.fontSizes.sm}
|
|
160
|
+
fontFamily={theme.fonts.inter_bold}
|
|
161
|
+
fontWeight="700"
|
|
162
|
+
color={theme.colors.red[500]}
|
|
163
|
+
marginBottom={12}
|
|
164
|
+
/>
|
|
165
|
+
<Box
|
|
166
|
+
backgroundColor={theme.colors.yellow[120]}
|
|
167
|
+
borderStyled={{ borderRadius: 8 }}
|
|
168
|
+
paddingStyle={{ padding: 8 }}
|
|
169
|
+
marginStyle={{ marginBottom: 8 }}
|
|
170
|
+
>
|
|
171
|
+
<Typography
|
|
172
|
+
text="• Login de local desconhecido"
|
|
173
|
+
size={theme.fontSizes["2xs"]}
|
|
174
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
175
|
+
color={theme.colors.gray[700]}
|
|
176
|
+
marginBottom={4}
|
|
177
|
+
/>
|
|
178
|
+
<Typography
|
|
179
|
+
text="• Alteração de dados da conta"
|
|
180
|
+
size={theme.fontSizes["2xs"]}
|
|
181
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
182
|
+
color={theme.colors.gray[700]}
|
|
183
|
+
/>
|
|
184
|
+
</Box>
|
|
185
|
+
<Typography
|
|
186
|
+
text="Revise sua conta agora para garantir sua segurança."
|
|
187
|
+
size={theme.fontSizes["2xs"]}
|
|
188
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
189
|
+
color={theme.colors.gray[600]}
|
|
190
|
+
marginTop={8}
|
|
191
|
+
/>
|
|
192
|
+
</Box>
|
|
193
|
+
),
|
|
194
|
+
actionLabel: "Revisar Conta",
|
|
195
|
+
onPress: () => {
|
|
196
|
+
console.log("Notificação clicada-6");
|
|
197
|
+
},
|
|
198
|
+
onPressAction: () => {
|
|
199
|
+
console.log("Notificação clicada-7");
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
};
|
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
import type { StoryObj, Meta } from "@storybook/react";
|
|
4
|
-
import { NotificationLoading } from "../../components/notification-loading";
|
|
5
|
-
|
|
6
|
-
const meta: Meta<typeof NotificationLoading> = {
|
|
7
|
-
title: "componente/NotificationLoading",
|
|
8
|
-
component: NotificationLoading as React.FC,
|
|
9
|
-
args: {
|
|
10
|
-
title: "Carregamento - #013200400456",
|
|
11
|
-
date: "12:30 07/05/2025",
|
|
12
|
-
handleNavigation: () => {},
|
|
13
|
-
notification: "Hoje você tem um carregamento agendamento",
|
|
14
|
-
statusNotify: "pending",
|
|
15
|
-
dataStart: "Hoje",
|
|
16
|
-
readonly: false,
|
|
17
|
-
},
|
|
18
|
-
parameters: {
|
|
19
|
-
notes: `
|
|
20
|
-
# NotificationLoading
|
|
21
|
-
|
|
22
|
-
Este é um componente de Card de notificação.
|
|
23
|
-
Você usa assim:
|
|
24
|
-
\`\`\`tsx
|
|
25
|
-
<NotificationLoading
|
|
26
|
-
title=""
|
|
27
|
-
date=""
|
|
28
|
-
handleNavigation={() => {}}
|
|
29
|
-
notification=""
|
|
30
|
-
statusNotify=""
|
|
31
|
-
dataStart: "Hoje",
|
|
32
|
-
readonly: false,
|
|
33
|
-
/>
|
|
34
|
-
\`\`\`
|
|
35
|
-
`,
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export default meta;
|
|
40
|
-
|
|
41
|
-
type Story = StoryObj<typeof meta>;
|
|
42
|
-
|
|
43
|
-
export const NotificationLoadingPending: Story = {
|
|
44
|
-
name: "Notification-pending",
|
|
45
|
-
args: {
|
|
46
|
-
title: "#013200400456",
|
|
47
|
-
date: "12:30 07/05/2025",
|
|
48
|
-
handleNavigation: () => {},
|
|
49
|
-
notification: "Hoje você tem um carregamento agendamento",
|
|
50
|
-
statusNotify: "Pendente",
|
|
51
|
-
dataStart: "Ontem",
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
export const NotificationLoadingApproved: Story = {
|
|
55
|
-
name: "Notification-Approved",
|
|
56
|
-
args: {
|
|
57
|
-
title: "#013200400456",
|
|
58
|
-
date: "12:30 07/05/2025",
|
|
59
|
-
handleNavigation: () => {},
|
|
60
|
-
notification: "Hoje você tem um carregamento agendamento",
|
|
61
|
-
statusNotify: "Aprovado",
|
|
62
|
-
dataStart: "Hoje",
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
export const NotificationLoadingRecused: Story = {
|
|
66
|
-
name: "Notification-recused",
|
|
67
|
-
args: {
|
|
68
|
-
title: "#013200400456",
|
|
69
|
-
date: "12:30 07/05/2025",
|
|
70
|
-
handleNavigation: () => {},
|
|
71
|
-
notification: "Hoje você tem um carregamento agendamento",
|
|
72
|
-
statusNotify: "Reprovado",
|
|
73
|
-
dataStart: "25 abril 2025",
|
|
74
|
-
},
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export const NotificationLoadingReadonly: Story = {
|
|
78
|
-
name: "Notification-readonly",
|
|
79
|
-
args: {
|
|
80
|
-
title: "#013200400456",
|
|
81
|
-
date: "12:30 07/05/2025",
|
|
82
|
-
handleNavigation: () => {},
|
|
83
|
-
notification: "Hoje você tem um carregamento agendamento",
|
|
84
|
-
statusNotify: "Reprovado",
|
|
85
|
-
dataStart: "25 abril 2025",
|
|
86
|
-
readonly: true,
|
|
87
|
-
},
|
|
88
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
4
|
+
import { NotificationLoading } from "../../components/notification-loading";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof NotificationLoading> = {
|
|
7
|
+
title: "componente/NotificationLoading",
|
|
8
|
+
component: NotificationLoading as React.FC,
|
|
9
|
+
args: {
|
|
10
|
+
title: "Carregamento - #013200400456",
|
|
11
|
+
date: "12:30 07/05/2025",
|
|
12
|
+
handleNavigation: () => { },
|
|
13
|
+
notification: "Hoje você tem um carregamento agendamento",
|
|
14
|
+
statusNotify: "pending",
|
|
15
|
+
dataStart: "Hoje",
|
|
16
|
+
readonly: false,
|
|
17
|
+
},
|
|
18
|
+
parameters: {
|
|
19
|
+
notes: `
|
|
20
|
+
# NotificationLoading
|
|
21
|
+
|
|
22
|
+
Este é um componente de Card de notificação.
|
|
23
|
+
Você usa assim:
|
|
24
|
+
\`\`\`tsx
|
|
25
|
+
<NotificationLoading
|
|
26
|
+
title=""
|
|
27
|
+
date=""
|
|
28
|
+
handleNavigation={() => {}}
|
|
29
|
+
notification=""
|
|
30
|
+
statusNotify=""
|
|
31
|
+
dataStart: "Hoje",
|
|
32
|
+
readonly: false,
|
|
33
|
+
/>
|
|
34
|
+
\`\`\`
|
|
35
|
+
`,
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default meta;
|
|
40
|
+
|
|
41
|
+
type Story = StoryObj<typeof meta>;
|
|
42
|
+
|
|
43
|
+
export const NotificationLoadingPending: Story = {
|
|
44
|
+
name: "Notification-pending",
|
|
45
|
+
args: {
|
|
46
|
+
title: "#013200400456",
|
|
47
|
+
date: "12:30 07/05/2025",
|
|
48
|
+
handleNavigation: () => { },
|
|
49
|
+
notification: "Hoje você tem um carregamento agendamento",
|
|
50
|
+
statusNotify: "Pendente",
|
|
51
|
+
dataStart: "Ontem",
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
export const NotificationLoadingApproved: Story = {
|
|
55
|
+
name: "Notification-Approved",
|
|
56
|
+
args: {
|
|
57
|
+
title: "#013200400456",
|
|
58
|
+
date: "12:30 07/05/2025",
|
|
59
|
+
handleNavigation: () => { },
|
|
60
|
+
notification: "Hoje você tem um carregamento agendamento",
|
|
61
|
+
statusNotify: "Aprovado",
|
|
62
|
+
dataStart: "Hoje",
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
export const NotificationLoadingRecused: Story = {
|
|
66
|
+
name: "Notification-recused",
|
|
67
|
+
args: {
|
|
68
|
+
title: "#013200400456",
|
|
69
|
+
date: "12:30 07/05/2025",
|
|
70
|
+
handleNavigation: () => { },
|
|
71
|
+
notification: "Hoje você tem um carregamento agendamento",
|
|
72
|
+
statusNotify: "Reprovado",
|
|
73
|
+
dataStart: "25 abril 2025",
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const NotificationLoadingReadonly: Story = {
|
|
78
|
+
name: "Notification-readonly",
|
|
79
|
+
args: {
|
|
80
|
+
title: "#013200400456",
|
|
81
|
+
date: "12:30 07/05/2025",
|
|
82
|
+
handleNavigation: () => { },
|
|
83
|
+
notification: "Hoje você tem um carregamento agendamento",
|
|
84
|
+
statusNotify: "Reprovado",
|
|
85
|
+
dataStart: "25 abril 2025",
|
|
86
|
+
readonly: true,
|
|
87
|
+
},
|
|
88
|
+
};
|