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,99 +1,99 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React from "react";
|
|
5
|
-
|
|
6
|
-
// components
|
|
7
|
-
import { Box } from "../box";
|
|
8
|
-
import { Typography } from "../typography";
|
|
9
|
-
|
|
10
|
-
// typings
|
|
11
|
-
import { IHistoryDetails } from "./interface";
|
|
12
|
-
|
|
13
|
-
// styles
|
|
14
|
-
import { theme } from "../../styles/theme/theme";
|
|
15
|
-
|
|
16
|
-
const HistoryDetails: React.FC<IHistoryDetails> = ({
|
|
17
|
-
numero = "01020304050607",
|
|
18
|
-
local = "Doca 1, Pátio 02 - Usimais (Ipatinga)",
|
|
19
|
-
date = "24/03/2025",
|
|
20
|
-
duracao = "00:30",
|
|
21
|
-
}) => {
|
|
22
|
-
return (
|
|
23
|
-
<Box width="100%" borderStyled={{ borderRadius: 8 }} backgroundColor={theme.colors.blue[400]}>
|
|
24
|
-
<Box
|
|
25
|
-
flexStyle={{
|
|
26
|
-
flexDirection: "column",
|
|
27
|
-
justifyContent: "flex-start",
|
|
28
|
-
alignItems: "flex-start",
|
|
29
|
-
}}
|
|
30
|
-
paddingStyle={{ padding: theme.paddings.xs }}
|
|
31
|
-
>
|
|
32
|
-
<Typography
|
|
33
|
-
text={`Carregamento - #${numero}`}
|
|
34
|
-
size={theme.fontSizes.sm}
|
|
35
|
-
fontFamily={theme.fonts.inter_semi_bold_600}
|
|
36
|
-
fontWeight="600"
|
|
37
|
-
color={theme.colors.neutral[25]}
|
|
38
|
-
lineHeight={theme.fontSizes.xl}
|
|
39
|
-
letterSpacing={"regular"}
|
|
40
|
-
/>
|
|
41
|
-
|
|
42
|
-
<Typography
|
|
43
|
-
text={local}
|
|
44
|
-
color={theme.colors.neutral[25]}
|
|
45
|
-
size={theme.fontSizes.xs}
|
|
46
|
-
lineHeight={theme.fontSizes.lg}
|
|
47
|
-
fontFamily={theme.fonts.inter_regular_400}
|
|
48
|
-
letterSpacing={"regular"}
|
|
49
|
-
numberOfLines={1}
|
|
50
|
-
/>
|
|
51
|
-
<Typography
|
|
52
|
-
text={`Data carregamento: ${date}`}
|
|
53
|
-
color={theme.colors.neutral[25]}
|
|
54
|
-
size={theme.fontSizes.xs}
|
|
55
|
-
fontFamily={theme.fonts.inter_regular_400}
|
|
56
|
-
lineHeight={theme.fontSizes.lg}
|
|
57
|
-
letterSpacing={"regular"}
|
|
58
|
-
numberOfLines={1}
|
|
59
|
-
/>
|
|
60
|
-
</Box>
|
|
61
|
-
|
|
62
|
-
<Box height={1} backgroundColor={theme.colors.gray[950]} />
|
|
63
|
-
|
|
64
|
-
<Box
|
|
65
|
-
flexStyle={{
|
|
66
|
-
flexDirection: "row",
|
|
67
|
-
justifyContent: "space-between",
|
|
68
|
-
alignItems: "center",
|
|
69
|
-
}}
|
|
70
|
-
paddingStyle={{ padding: theme.paddings.xs }}
|
|
71
|
-
>
|
|
72
|
-
<Typography
|
|
73
|
-
text={"DURAÇÃO:"}
|
|
74
|
-
color={theme.colors.neutral[25]}
|
|
75
|
-
size={24}
|
|
76
|
-
fontFamily={theme.fonts.inter_regular_400}
|
|
77
|
-
fontWeight="400"
|
|
78
|
-
lineHeight={theme.fontSizes["3xl"]}
|
|
79
|
-
letterSpacing={"regular"}
|
|
80
|
-
/>
|
|
81
|
-
<Typography
|
|
82
|
-
text={duracao}
|
|
83
|
-
color={theme.colors.neutral[25]}
|
|
84
|
-
size={26}
|
|
85
|
-
align="left"
|
|
86
|
-
fontFamily={theme.fonts.inter_medium_500}
|
|
87
|
-
fontWeight="500"
|
|
88
|
-
lineHeight={theme.fontSizes["3xl"]}
|
|
89
|
-
letterSpacing={"regular"}
|
|
90
|
-
/>
|
|
91
|
-
</Box>
|
|
92
|
-
</Box>
|
|
93
|
-
);
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* EXPORTS
|
|
98
|
-
*/
|
|
99
|
-
export { HistoryDetails };
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
|
|
6
|
+
// components
|
|
7
|
+
import { Box } from "../box";
|
|
8
|
+
import { Typography } from "../typography";
|
|
9
|
+
|
|
10
|
+
// typings
|
|
11
|
+
import { IHistoryDetails } from "./interface";
|
|
12
|
+
|
|
13
|
+
// styles
|
|
14
|
+
import { theme } from "../../styles/theme/theme";
|
|
15
|
+
|
|
16
|
+
const HistoryDetails: React.FC<IHistoryDetails> = ({
|
|
17
|
+
numero = "01020304050607",
|
|
18
|
+
local = "Doca 1, Pátio 02 - Usimais (Ipatinga)",
|
|
19
|
+
date = "24/03/2025",
|
|
20
|
+
duracao = "00:30",
|
|
21
|
+
}) => {
|
|
22
|
+
return (
|
|
23
|
+
<Box width="100%" borderStyled={{ borderRadius: 8 }} backgroundColor={theme.colors.blue[400]}>
|
|
24
|
+
<Box
|
|
25
|
+
flexStyle={{
|
|
26
|
+
flexDirection: "column",
|
|
27
|
+
justifyContent: "flex-start",
|
|
28
|
+
alignItems: "flex-start",
|
|
29
|
+
}}
|
|
30
|
+
paddingStyle={{ padding: theme.paddings.xs }}
|
|
31
|
+
>
|
|
32
|
+
<Typography
|
|
33
|
+
text={`Carregamento - #${numero}`}
|
|
34
|
+
size={theme.fontSizes.sm}
|
|
35
|
+
fontFamily={theme.fonts.inter_semi_bold_600}
|
|
36
|
+
fontWeight="600"
|
|
37
|
+
color={theme.colors.neutral[25]}
|
|
38
|
+
lineHeight={theme.fontSizes.xl}
|
|
39
|
+
letterSpacing={"regular"}
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
<Typography
|
|
43
|
+
text={local}
|
|
44
|
+
color={theme.colors.neutral[25]}
|
|
45
|
+
size={theme.fontSizes.xs}
|
|
46
|
+
lineHeight={theme.fontSizes.lg}
|
|
47
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
48
|
+
letterSpacing={"regular"}
|
|
49
|
+
numberOfLines={1}
|
|
50
|
+
/>
|
|
51
|
+
<Typography
|
|
52
|
+
text={`Data carregamento: ${date}`}
|
|
53
|
+
color={theme.colors.neutral[25]}
|
|
54
|
+
size={theme.fontSizes.xs}
|
|
55
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
56
|
+
lineHeight={theme.fontSizes.lg}
|
|
57
|
+
letterSpacing={"regular"}
|
|
58
|
+
numberOfLines={1}
|
|
59
|
+
/>
|
|
60
|
+
</Box>
|
|
61
|
+
|
|
62
|
+
<Box height={1} backgroundColor={theme.colors.gray[950]} />
|
|
63
|
+
|
|
64
|
+
<Box
|
|
65
|
+
flexStyle={{
|
|
66
|
+
flexDirection: "row",
|
|
67
|
+
justifyContent: "space-between",
|
|
68
|
+
alignItems: "center",
|
|
69
|
+
}}
|
|
70
|
+
paddingStyle={{ padding: theme.paddings.xs }}
|
|
71
|
+
>
|
|
72
|
+
<Typography
|
|
73
|
+
text={"DURAÇÃO:"}
|
|
74
|
+
color={theme.colors.neutral[25]}
|
|
75
|
+
size={24}
|
|
76
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
77
|
+
fontWeight="400"
|
|
78
|
+
lineHeight={theme.fontSizes["3xl"]}
|
|
79
|
+
letterSpacing={"regular"}
|
|
80
|
+
/>
|
|
81
|
+
<Typography
|
|
82
|
+
text={duracao}
|
|
83
|
+
color={theme.colors.neutral[25]}
|
|
84
|
+
size={26}
|
|
85
|
+
align="left"
|
|
86
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
87
|
+
fontWeight="500"
|
|
88
|
+
lineHeight={theme.fontSizes["3xl"]}
|
|
89
|
+
letterSpacing={"regular"}
|
|
90
|
+
/>
|
|
91
|
+
</Box>
|
|
92
|
+
</Box>
|
|
93
|
+
);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* EXPORTS
|
|
98
|
+
*/
|
|
99
|
+
export { HistoryDetails };
|
|
@@ -1,123 +1,127 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React, { forwardRef } from "react";
|
|
5
|
-
import { TouchableOpacity, View } from "react-native";
|
|
6
|
-
|
|
7
|
-
// commons / icons
|
|
8
|
-
import { Icons } from "../../common/icons-svg";
|
|
9
|
-
|
|
10
|
-
// components
|
|
11
|
-
import { Box } from "../box";
|
|
12
|
-
import { Typography } from "../typography";
|
|
13
|
-
import { Button } from "../button";
|
|
14
|
-
|
|
15
|
-
// styles / theme
|
|
16
|
-
import { theme } from "../../styles/theme/theme";
|
|
17
|
-
|
|
18
|
-
// typings
|
|
19
|
-
import { asBaseComponent } from "../../@types/as-base-component";
|
|
20
|
-
import type { INotificationCardProps } from "./interface";
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Componente NotificationCard
|
|
24
|
-
*/
|
|
25
|
-
const NotificationCard: React.FC<INotificationCardProps> = forwardRef<View, INotificationCardProps>(
|
|
26
|
-
({ variant = "read", title, description, actionLabel, onPress, onPressAction, testID }, ref) => {
|
|
27
|
-
const isWarning = variant === "unread";
|
|
28
|
-
|
|
29
|
-
// cor da borda lateral
|
|
30
|
-
const borderColor = isWarning ? theme.colors.orange[150] : theme.colors.blue[525];
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<TouchableOpacity onPress={onPress} activeOpacity={0.7}>
|
|
34
|
-
<Box
|
|
35
|
-
ref={ref as React.RefObject<View>}
|
|
36
|
-
testID={testID ?? "notification-card"}
|
|
37
|
-
flexStyle={{ flexDirection: "row" }}
|
|
38
|
-
borderStyled={{
|
|
39
|
-
borderWidth: 1,
|
|
40
|
-
borderColor: isWarning ? theme.colors.orange[150] : theme.colors.neutral[200],
|
|
41
|
-
borderRadius: theme.borderWidths.thick_medium,
|
|
42
|
-
}}
|
|
43
|
-
marginStyle={{ marginBottom: 12 }}
|
|
44
|
-
backgroundColor={isWarning ? theme.colors.neutral[500] : theme.colors.neutral[25]}
|
|
45
|
-
>
|
|
46
|
-
{/* borda fixa lateral esquerda */}
|
|
47
|
-
<Box
|
|
48
|
-
width={8}
|
|
49
|
-
backgroundColor={borderColor}
|
|
50
|
-
borderStyled={{
|
|
51
|
-
borderTopLeftRadius: theme.borderWidths.thick_medium,
|
|
52
|
-
borderBottomLeftRadius: theme.borderWidths.thick_medium,
|
|
53
|
-
}}
|
|
54
|
-
/>
|
|
55
|
-
|
|
56
|
-
{/* Conteúdo do card */}
|
|
57
|
-
<Box flexStyle={{ flex: 1 }} paddingStyle={{ padding: theme.paddings.sm }}>
|
|
58
|
-
{/* Header */}
|
|
59
|
-
<Box
|
|
60
|
-
flexStyle={{ flexDirection: "row", alignItems: "center" }}
|
|
61
|
-
marginStyle={{ marginBottom: 6 }}
|
|
62
|
-
>
|
|
63
|
-
<Icons icon="BELL" color={borderColor} size={20} />
|
|
64
|
-
<Typography
|
|
65
|
-
text={title}
|
|
66
|
-
fontFamily={theme.fonts.inter_bold}
|
|
67
|
-
fontWeight="700"
|
|
68
|
-
size={theme.fontSizes.md}
|
|
69
|
-
color={theme.colors.black[100]}
|
|
70
|
-
marginLeft={8}
|
|
71
|
-
/>
|
|
72
|
-
</Box>
|
|
73
|
-
|
|
74
|
-
{/* Texto */}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React, { forwardRef } from "react";
|
|
5
|
+
import { TouchableOpacity, View } from "react-native";
|
|
6
|
+
|
|
7
|
+
// commons / icons
|
|
8
|
+
import { Icons } from "../../common/icons-svg";
|
|
9
|
+
|
|
10
|
+
// components
|
|
11
|
+
import { Box } from "../box";
|
|
12
|
+
import { Typography } from "../typography";
|
|
13
|
+
import { Button } from "../button";
|
|
14
|
+
|
|
15
|
+
// styles / theme
|
|
16
|
+
import { theme } from "../../styles/theme/theme";
|
|
17
|
+
|
|
18
|
+
// typings
|
|
19
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
20
|
+
import type { INotificationCardProps } from "./interface";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Componente NotificationCard
|
|
24
|
+
*/
|
|
25
|
+
const NotificationCard: React.FC<INotificationCardProps> = forwardRef<View, INotificationCardProps>(
|
|
26
|
+
({ variant = "read", title, description, actionLabel, onPress, onPressAction, testID }, ref) => {
|
|
27
|
+
const isWarning = variant === "unread";
|
|
28
|
+
|
|
29
|
+
// cor da borda lateral
|
|
30
|
+
const borderColor = isWarning ? theme.colors.orange[150] : theme.colors.blue[525];
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<TouchableOpacity onPress={onPress} activeOpacity={0.7}>
|
|
34
|
+
<Box
|
|
35
|
+
ref={ref as React.RefObject<View>}
|
|
36
|
+
testID={testID ?? "notification-card"}
|
|
37
|
+
flexStyle={{ flexDirection: "row" }}
|
|
38
|
+
borderStyled={{
|
|
39
|
+
borderWidth: 1,
|
|
40
|
+
borderColor: isWarning ? theme.colors.orange[150] : theme.colors.neutral[200],
|
|
41
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
42
|
+
}}
|
|
43
|
+
marginStyle={{ marginBottom: 12 }}
|
|
44
|
+
backgroundColor={isWarning ? theme.colors.neutral[500] : theme.colors.neutral[25]}
|
|
45
|
+
>
|
|
46
|
+
{/* borda fixa lateral esquerda */}
|
|
47
|
+
<Box
|
|
48
|
+
width={8}
|
|
49
|
+
backgroundColor={borderColor}
|
|
50
|
+
borderStyled={{
|
|
51
|
+
borderTopLeftRadius: theme.borderWidths.thick_medium,
|
|
52
|
+
borderBottomLeftRadius: theme.borderWidths.thick_medium,
|
|
53
|
+
}}
|
|
54
|
+
/>
|
|
55
|
+
|
|
56
|
+
{/* Conteúdo do card */}
|
|
57
|
+
<Box flexStyle={{ flex: 1 }} paddingStyle={{ padding: theme.paddings.sm }}>
|
|
58
|
+
{/* Header */}
|
|
59
|
+
<Box
|
|
60
|
+
flexStyle={{ flexDirection: "row", alignItems: "center" }}
|
|
61
|
+
marginStyle={{ marginBottom: 6 }}
|
|
62
|
+
>
|
|
63
|
+
<Icons icon="BELL" color={borderColor} size={20} />
|
|
64
|
+
<Typography
|
|
65
|
+
text={title}
|
|
66
|
+
fontFamily={theme.fonts.inter_bold}
|
|
67
|
+
fontWeight="700"
|
|
68
|
+
size={theme.fontSizes.md}
|
|
69
|
+
color={theme.colors.black[100]}
|
|
70
|
+
marginLeft={8}
|
|
71
|
+
/>
|
|
72
|
+
</Box>
|
|
73
|
+
|
|
74
|
+
{/* Texto */}
|
|
75
|
+
{typeof description === "string" ? (
|
|
76
|
+
<Typography
|
|
77
|
+
text={description}
|
|
78
|
+
numberOfLines={isWarning ? 2 : 4}
|
|
79
|
+
ellipsizeMode="tail"
|
|
80
|
+
size={theme.fontSizes.sm}
|
|
81
|
+
lineHeight={theme.lineHeight.md}
|
|
82
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
83
|
+
color={theme.colors.gray[700]}
|
|
84
|
+
marginBottom={theme.margins.xs}
|
|
85
|
+
/>
|
|
86
|
+
) : (
|
|
87
|
+
<Box marginStyle={{ marginBottom: theme.margins.xs }}>{description}</Box>
|
|
88
|
+
)}
|
|
89
|
+
|
|
90
|
+
{/* Ação opcional */}
|
|
91
|
+
{actionLabel && onPressAction && (
|
|
92
|
+
<Button
|
|
93
|
+
isLoading={false}
|
|
94
|
+
title={actionLabel}
|
|
95
|
+
onPress={onPressAction}
|
|
96
|
+
backgroundColor={theme.colors.neutral[25]}
|
|
97
|
+
borderStyled={{
|
|
98
|
+
borderWidth: 1,
|
|
99
|
+
borderColor: theme.colors.red[500],
|
|
100
|
+
borderRadius: 12,
|
|
101
|
+
}}
|
|
102
|
+
buttonTextStyle={{
|
|
103
|
+
color: theme.colors.red[500],
|
|
104
|
+
fontSize: theme.fontSizes.sm,
|
|
105
|
+
fontFamily: theme.fonts.inter_medium_500,
|
|
106
|
+
}}
|
|
107
|
+
flexStyle={{
|
|
108
|
+
flexDirection: "row",
|
|
109
|
+
alignItems: "center",
|
|
110
|
+
justifyContent: "center",
|
|
111
|
+
}}
|
|
112
|
+
style={{ alignSelf: "flex-start", paddingHorizontal: 12 }}
|
|
113
|
+
/>
|
|
114
|
+
)}
|
|
115
|
+
</Box>
|
|
116
|
+
</Box>
|
|
117
|
+
</TouchableOpacity>
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
NotificationCard.displayName = "NotificationCard";
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* EXPORTS
|
|
126
|
+
*/
|
|
127
|
+
export default asBaseComponent(NotificationCard);
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import type { ReactNode } from "react";
|
|
5
|
+
|
|
6
|
+
interface INotificationCardProps {
|
|
7
|
+
variant?: "read" | "unread";
|
|
8
|
+
title: string;
|
|
9
|
+
description: string | ReactNode;
|
|
10
|
+
actionLabel?: string;
|
|
11
|
+
onPress?: () => void;
|
|
12
|
+
onPressAction?: () => void;
|
|
13
|
+
testID?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* EXPORTS
|
|
18
|
+
*/
|
|
19
|
+
export { type INotificationCardProps };
|