@hero-design/rn 8.92.3 → 8.94.0
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/.turbo/turbo-build.log +2 -2
- package/CHANGELOG.md +16 -0
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +961 -140
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +960 -139
- package/package.json +1 -1
- package/src/components/Badge/Count.tsx +60 -0
- package/src/components/Badge/StyledBadge.tsx +33 -2
- package/src/components/Badge/__tests__/Count.spec.tsx +38 -0
- package/src/components/Badge/__tests__/__snapshots__/Count.spec.tsx.snap +310 -0
- package/src/components/Badge/constants.ts +1 -0
- package/src/components/Badge/index.tsx +3 -2
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +1 -0
- package/src/components/{Empty → StatusScreens/Empty}/StyledEmpty.tsx +11 -2
- package/src/components/StatusScreens/Empty/__tests__/__snapshots__/index.spec.tsx.snap +468 -0
- package/src/components/{Empty → StatusScreens/Empty}/__tests__/index.spec.tsx +16 -2
- package/src/components/StatusScreens/Empty/index.tsx +97 -0
- package/src/components/{Error → StatusScreens/Error}/StyledError.tsx +4 -4
- package/src/components/{Error → StatusScreens/Error}/__tests__/__snapshots__/index.spec.tsx.snap +300 -0
- package/src/components/{Error → StatusScreens/Error}/__tests__/index.spec.tsx +13 -3
- package/src/components/{Error → StatusScreens/Error}/index.tsx +39 -7
- package/src/components/StatusScreens/StatusIcon/__tests__/index.spec.tsx +31 -0
- package/src/components/StatusScreens/StatusIcon/assets/Add.tsx +49 -0
- package/src/components/StatusScreens/StatusIcon/assets/Boom.tsx +61 -0
- package/src/components/StatusScreens/StatusIcon/assets/Build.tsx +45 -0
- package/src/components/StatusScreens/StatusIcon/assets/Clock.tsx +38 -0
- package/src/components/StatusScreens/StatusIcon/assets/Confetti.tsx +78 -0
- package/src/components/StatusScreens/StatusIcon/assets/Connections.tsx +57 -0
- package/src/components/StatusScreens/StatusIcon/assets/Error.tsx +55 -0
- package/src/components/StatusScreens/StatusIcon/assets/Info.tsx +35 -0
- package/src/components/StatusScreens/StatusIcon/assets/List.tsx +37 -0
- package/src/components/StatusScreens/StatusIcon/assets/Location.tsx +37 -0
- package/src/components/StatusScreens/StatusIcon/assets/Merge.tsx +59 -0
- package/src/components/StatusScreens/StatusIcon/assets/Notifications.tsx +26 -0
- package/src/components/StatusScreens/StatusIcon/assets/Search.tsx +36 -0
- package/src/components/StatusScreens/StatusIcon/assets/Star.tsx +37 -0
- package/src/components/StatusScreens/StatusIcon/assets/Success.tsx +41 -0
- package/src/components/StatusScreens/StatusIcon/assets/User.tsx +43 -0
- package/src/components/StatusScreens/StatusIcon/index.tsx +63 -0
- package/src/components/StatusScreens/StatusIcon/types.ts +5 -0
- package/src/components/{Success → StatusScreens/Success}/StyledSuccess.tsx +4 -4
- package/src/components/{Success → StatusScreens/Success}/__tests__/__snapshots__/index.spec.tsx.snap +263 -0
- package/src/components/{Success → StatusScreens/Success}/__tests__/index.spec.tsx +13 -4
- package/src/components/{Success → StatusScreens/Success}/index.tsx +38 -7
- package/src/index.ts +3 -3
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +11 -0
- package/src/theme/components/badge.ts +26 -1
- package/stats/8.94.0/rn-stats.html +4842 -0
- package/types/components/Badge/Count.d.ts +27 -0
- package/types/components/Badge/StyledBadge.d.ts +14 -4
- package/types/components/Badge/constants.d.ts +1 -0
- package/types/components/Badge/index.d.ts +1 -0
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/{Empty → StatusScreens/Empty}/StyledEmpty.d.ts +9 -3
- package/types/components/{Empty → StatusScreens/Empty}/index.d.ts +8 -3
- package/types/components/{Error → StatusScreens/Error}/StyledError.d.ts +6 -6
- package/types/components/{Error → StatusScreens/Error}/index.d.ts +6 -1
- package/types/components/StatusScreens/StatusIcon/assets/Add.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Boom.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Build.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Clock.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Confetti.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Connections.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Error.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Info.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/List.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Location.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Merge.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Notifications.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Search.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Star.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Success.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/User.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/index.d.ts +26 -0
- package/types/components/StatusScreens/StatusIcon/types.d.ts +5 -0
- package/types/components/{Success → StatusScreens/Success}/StyledSuccess.d.ts +5 -5
- package/types/components/{Success → StatusScreens/Success}/index.d.ts +6 -1
- package/types/components/TextInput/index.d.ts +1 -1
- package/types/index.d.ts +3 -3
- package/types/theme/components/badge.d.ts +11 -0
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +0 -218
- package/src/components/Empty/index.tsx +0 -73
package/package.json
CHANGED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import type { StyleProp, ViewStyle, ViewProps } from 'react-native';
|
|
4
|
+
import type { ReactNode } from 'react';
|
|
5
|
+
import { StyledCount, StyledCountText } from './StyledBadge';
|
|
6
|
+
import { DEFAULT_MAX_NUMBER } from './constants';
|
|
7
|
+
|
|
8
|
+
export interface CountProps extends ViewProps {
|
|
9
|
+
/*
|
|
10
|
+
* The Status Badge's content.
|
|
11
|
+
*/
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the Status Badge is visible.
|
|
15
|
+
*/
|
|
16
|
+
visible?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Additional style.
|
|
19
|
+
*/
|
|
20
|
+
style?: StyleProp<ViewStyle>;
|
|
21
|
+
/**
|
|
22
|
+
* Testing id of the component.
|
|
23
|
+
*/
|
|
24
|
+
testID?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The content will be displayed in the badge.
|
|
27
|
+
*/
|
|
28
|
+
content: number;
|
|
29
|
+
/**
|
|
30
|
+
* The maximum number displayed on the badge. If number exceeds this value, `${max}+` are displayed instead. (Only applied when content is number.)
|
|
31
|
+
*/
|
|
32
|
+
max?: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const Status = ({
|
|
36
|
+
children,
|
|
37
|
+
visible = true,
|
|
38
|
+
style,
|
|
39
|
+
max = DEFAULT_MAX_NUMBER,
|
|
40
|
+
testID,
|
|
41
|
+
content: originalContent,
|
|
42
|
+
...nativeProps
|
|
43
|
+
}: CountProps): JSX.Element => {
|
|
44
|
+
const content = useMemo(() => {
|
|
45
|
+
return originalContent > max ? `${max}+` : String(originalContent);
|
|
46
|
+
}, [originalContent, max]);
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<View {...nativeProps} style={style} testID={testID}>
|
|
50
|
+
{children}
|
|
51
|
+
{visible && (
|
|
52
|
+
<StyledCount testID="count-badge">
|
|
53
|
+
<StyledCountText>{content}</StyledCountText>
|
|
54
|
+
</StyledCount>
|
|
55
|
+
)}
|
|
56
|
+
</View>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default Status;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Animated } from 'react-native';
|
|
1
|
+
import { Animated, View } from 'react-native';
|
|
2
2
|
import styled from '@emotion/native';
|
|
3
3
|
import Typography from '../Typography';
|
|
4
4
|
import Icon from '../Icon';
|
|
@@ -64,10 +64,41 @@ const StyledStatus = styled(Animated.View)<{
|
|
|
64
64
|
borderRadius: theme.radii.rounded,
|
|
65
65
|
}));
|
|
66
66
|
|
|
67
|
+
const StyledCount = styled(View)(({ theme }) => ({
|
|
68
|
+
backgroundColor: theme.__hd__.badge.colors.danger,
|
|
69
|
+
borderRadius: theme.__hd__.badge.radii.count,
|
|
70
|
+
minWidth: theme.__hd__.badge.sizes.count.width,
|
|
71
|
+
height: theme.__hd__.badge.sizes.count.height,
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
justifyContent: 'center',
|
|
74
|
+
textAlign: 'center',
|
|
75
|
+
textAlignVertical: 'center',
|
|
76
|
+
color: theme.__hd__.badge.colors.text,
|
|
77
|
+
display: 'flex',
|
|
78
|
+
paddingHorizontal: theme.__hd__.badge.space.countPaddingHorizontal,
|
|
79
|
+
position: 'absolute',
|
|
80
|
+
top: theme.__hd__.badge.space.statusPositionTop,
|
|
81
|
+
right: theme.__hd__.badge.space.statusPositionRight,
|
|
82
|
+
}));
|
|
83
|
+
|
|
84
|
+
const StyledCountText = styled(Typography.Text)(({ theme }) => ({
|
|
85
|
+
height: theme.__hd__.badge.sizes.count.height,
|
|
86
|
+
lineHeight: theme.__hd__.badge.lineHeights.count,
|
|
87
|
+
color: theme.__hd__.badge.colors.text,
|
|
88
|
+
fontSize: theme.__hd__.badge.fontSizes.count,
|
|
89
|
+
}));
|
|
90
|
+
|
|
67
91
|
const StyledIcon = styled(Icon)<{
|
|
68
92
|
themeSize: ThemeSize;
|
|
69
93
|
}>(({ themeSize, theme }) => ({
|
|
70
94
|
fontSize: theme.__hd__.badge.fontSizes[themeSize],
|
|
71
95
|
}));
|
|
72
96
|
|
|
73
|
-
export {
|
|
97
|
+
export {
|
|
98
|
+
StyledCountText,
|
|
99
|
+
StyledView,
|
|
100
|
+
StyledText,
|
|
101
|
+
StyledStatus,
|
|
102
|
+
StyledIcon,
|
|
103
|
+
StyledCount,
|
|
104
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
3
|
+
import BadgeCount from '../Count';
|
|
4
|
+
import Icon from '../../Icon';
|
|
5
|
+
|
|
6
|
+
describe('BadgeCount', () => {
|
|
7
|
+
it.each`
|
|
8
|
+
content | expectedContent
|
|
9
|
+
${1} | ${'1'}
|
|
10
|
+
${12} | ${'12'}
|
|
11
|
+
${999} | ${'99+'}
|
|
12
|
+
`(
|
|
13
|
+
'displays $expectedContent for content $content',
|
|
14
|
+
({ content, expectedContent }) => {
|
|
15
|
+
const { getByText, getByTestId, toJSON } = renderWithTheme(
|
|
16
|
+
<BadgeCount content={content} testID="wrapper">
|
|
17
|
+
<Icon icon="bell-outlined" size="small" />
|
|
18
|
+
</BadgeCount>
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
expect(toJSON()).toMatchSnapshot();
|
|
22
|
+
expect(getByText(expectedContent)).toBeDefined();
|
|
23
|
+
expect(getByTestId('count-badge')).toHaveStyle({
|
|
24
|
+
backgroundColor: '#cb300a',
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
it('should hide if visible is false', () => {
|
|
30
|
+
const { queryByTestId } = renderWithTheme(
|
|
31
|
+
<BadgeCount content={1} visible={false} testID="wrapper">
|
|
32
|
+
<Icon icon="bell-outlined" size="small" />
|
|
33
|
+
</BadgeCount>
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
expect(queryByTestId('count-badge')).toBeNull();
|
|
37
|
+
});
|
|
38
|
+
});
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`BadgeCount displays 1 for content 1 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
style={
|
|
6
|
+
{
|
|
7
|
+
"flex": 1,
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
>
|
|
11
|
+
<View
|
|
12
|
+
testID="wrapper"
|
|
13
|
+
>
|
|
14
|
+
<HeroIcon
|
|
15
|
+
name="bell-outlined"
|
|
16
|
+
style={
|
|
17
|
+
[
|
|
18
|
+
{
|
|
19
|
+
"color": "#001f23",
|
|
20
|
+
"fontSize": 20,
|
|
21
|
+
},
|
|
22
|
+
undefined,
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
themeIntent="text"
|
|
26
|
+
themeSize="small"
|
|
27
|
+
/>
|
|
28
|
+
<View
|
|
29
|
+
style={
|
|
30
|
+
[
|
|
31
|
+
{
|
|
32
|
+
"alignItems": "center",
|
|
33
|
+
"backgroundColor": "#cb300a",
|
|
34
|
+
"borderRadius": 999,
|
|
35
|
+
"color": "#ffffff",
|
|
36
|
+
"display": "flex",
|
|
37
|
+
"height": 12,
|
|
38
|
+
"justifyContent": "center",
|
|
39
|
+
"minWidth": 12,
|
|
40
|
+
"paddingHorizontal": 2,
|
|
41
|
+
"position": "absolute",
|
|
42
|
+
"right": -2,
|
|
43
|
+
"textAlign": "center",
|
|
44
|
+
"textAlignVertical": "center",
|
|
45
|
+
"top": -2,
|
|
46
|
+
},
|
|
47
|
+
undefined,
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
testID="count-badge"
|
|
51
|
+
>
|
|
52
|
+
<Text
|
|
53
|
+
allowFontScaling={false}
|
|
54
|
+
style={
|
|
55
|
+
[
|
|
56
|
+
{
|
|
57
|
+
"color": "#001f23",
|
|
58
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
59
|
+
"fontSize": 14,
|
|
60
|
+
"letterSpacing": 0.42,
|
|
61
|
+
"lineHeight": 22,
|
|
62
|
+
},
|
|
63
|
+
[
|
|
64
|
+
{
|
|
65
|
+
"color": "#ffffff",
|
|
66
|
+
"fontSize": 6,
|
|
67
|
+
"height": 12,
|
|
68
|
+
"lineHeight": 12,
|
|
69
|
+
},
|
|
70
|
+
undefined,
|
|
71
|
+
],
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
themeFontSize="medium"
|
|
75
|
+
themeFontWeight="regular"
|
|
76
|
+
themeIntent="body"
|
|
77
|
+
themeTypeface="neutral"
|
|
78
|
+
>
|
|
79
|
+
1
|
|
80
|
+
</Text>
|
|
81
|
+
</View>
|
|
82
|
+
</View>
|
|
83
|
+
<View
|
|
84
|
+
pointerEvents="box-none"
|
|
85
|
+
position="bottom"
|
|
86
|
+
style={
|
|
87
|
+
[
|
|
88
|
+
{
|
|
89
|
+
"bottom": 0,
|
|
90
|
+
"elevation": 9999,
|
|
91
|
+
"flexDirection": "column-reverse",
|
|
92
|
+
"left": 0,
|
|
93
|
+
"paddingHorizontal": 24,
|
|
94
|
+
"paddingVertical": 16,
|
|
95
|
+
"position": "absolute",
|
|
96
|
+
"right": 0,
|
|
97
|
+
"top": 0,
|
|
98
|
+
},
|
|
99
|
+
undefined,
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
/>
|
|
103
|
+
</View>
|
|
104
|
+
`;
|
|
105
|
+
|
|
106
|
+
exports[`BadgeCount displays 12 for content 12 1`] = `
|
|
107
|
+
<View
|
|
108
|
+
style={
|
|
109
|
+
{
|
|
110
|
+
"flex": 1,
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
>
|
|
114
|
+
<View
|
|
115
|
+
testID="wrapper"
|
|
116
|
+
>
|
|
117
|
+
<HeroIcon
|
|
118
|
+
name="bell-outlined"
|
|
119
|
+
style={
|
|
120
|
+
[
|
|
121
|
+
{
|
|
122
|
+
"color": "#001f23",
|
|
123
|
+
"fontSize": 20,
|
|
124
|
+
},
|
|
125
|
+
undefined,
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
themeIntent="text"
|
|
129
|
+
themeSize="small"
|
|
130
|
+
/>
|
|
131
|
+
<View
|
|
132
|
+
style={
|
|
133
|
+
[
|
|
134
|
+
{
|
|
135
|
+
"alignItems": "center",
|
|
136
|
+
"backgroundColor": "#cb300a",
|
|
137
|
+
"borderRadius": 999,
|
|
138
|
+
"color": "#ffffff",
|
|
139
|
+
"display": "flex",
|
|
140
|
+
"height": 12,
|
|
141
|
+
"justifyContent": "center",
|
|
142
|
+
"minWidth": 12,
|
|
143
|
+
"paddingHorizontal": 2,
|
|
144
|
+
"position": "absolute",
|
|
145
|
+
"right": -2,
|
|
146
|
+
"textAlign": "center",
|
|
147
|
+
"textAlignVertical": "center",
|
|
148
|
+
"top": -2,
|
|
149
|
+
},
|
|
150
|
+
undefined,
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
testID="count-badge"
|
|
154
|
+
>
|
|
155
|
+
<Text
|
|
156
|
+
allowFontScaling={false}
|
|
157
|
+
style={
|
|
158
|
+
[
|
|
159
|
+
{
|
|
160
|
+
"color": "#001f23",
|
|
161
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
162
|
+
"fontSize": 14,
|
|
163
|
+
"letterSpacing": 0.42,
|
|
164
|
+
"lineHeight": 22,
|
|
165
|
+
},
|
|
166
|
+
[
|
|
167
|
+
{
|
|
168
|
+
"color": "#ffffff",
|
|
169
|
+
"fontSize": 6,
|
|
170
|
+
"height": 12,
|
|
171
|
+
"lineHeight": 12,
|
|
172
|
+
},
|
|
173
|
+
undefined,
|
|
174
|
+
],
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
themeFontSize="medium"
|
|
178
|
+
themeFontWeight="regular"
|
|
179
|
+
themeIntent="body"
|
|
180
|
+
themeTypeface="neutral"
|
|
181
|
+
>
|
|
182
|
+
12
|
|
183
|
+
</Text>
|
|
184
|
+
</View>
|
|
185
|
+
</View>
|
|
186
|
+
<View
|
|
187
|
+
pointerEvents="box-none"
|
|
188
|
+
position="bottom"
|
|
189
|
+
style={
|
|
190
|
+
[
|
|
191
|
+
{
|
|
192
|
+
"bottom": 0,
|
|
193
|
+
"elevation": 9999,
|
|
194
|
+
"flexDirection": "column-reverse",
|
|
195
|
+
"left": 0,
|
|
196
|
+
"paddingHorizontal": 24,
|
|
197
|
+
"paddingVertical": 16,
|
|
198
|
+
"position": "absolute",
|
|
199
|
+
"right": 0,
|
|
200
|
+
"top": 0,
|
|
201
|
+
},
|
|
202
|
+
undefined,
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
/>
|
|
206
|
+
</View>
|
|
207
|
+
`;
|
|
208
|
+
|
|
209
|
+
exports[`BadgeCount displays 99+ for content 999 1`] = `
|
|
210
|
+
<View
|
|
211
|
+
style={
|
|
212
|
+
{
|
|
213
|
+
"flex": 1,
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
>
|
|
217
|
+
<View
|
|
218
|
+
testID="wrapper"
|
|
219
|
+
>
|
|
220
|
+
<HeroIcon
|
|
221
|
+
name="bell-outlined"
|
|
222
|
+
style={
|
|
223
|
+
[
|
|
224
|
+
{
|
|
225
|
+
"color": "#001f23",
|
|
226
|
+
"fontSize": 20,
|
|
227
|
+
},
|
|
228
|
+
undefined,
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
themeIntent="text"
|
|
232
|
+
themeSize="small"
|
|
233
|
+
/>
|
|
234
|
+
<View
|
|
235
|
+
style={
|
|
236
|
+
[
|
|
237
|
+
{
|
|
238
|
+
"alignItems": "center",
|
|
239
|
+
"backgroundColor": "#cb300a",
|
|
240
|
+
"borderRadius": 999,
|
|
241
|
+
"color": "#ffffff",
|
|
242
|
+
"display": "flex",
|
|
243
|
+
"height": 12,
|
|
244
|
+
"justifyContent": "center",
|
|
245
|
+
"minWidth": 12,
|
|
246
|
+
"paddingHorizontal": 2,
|
|
247
|
+
"position": "absolute",
|
|
248
|
+
"right": -2,
|
|
249
|
+
"textAlign": "center",
|
|
250
|
+
"textAlignVertical": "center",
|
|
251
|
+
"top": -2,
|
|
252
|
+
},
|
|
253
|
+
undefined,
|
|
254
|
+
]
|
|
255
|
+
}
|
|
256
|
+
testID="count-badge"
|
|
257
|
+
>
|
|
258
|
+
<Text
|
|
259
|
+
allowFontScaling={false}
|
|
260
|
+
style={
|
|
261
|
+
[
|
|
262
|
+
{
|
|
263
|
+
"color": "#001f23",
|
|
264
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
265
|
+
"fontSize": 14,
|
|
266
|
+
"letterSpacing": 0.42,
|
|
267
|
+
"lineHeight": 22,
|
|
268
|
+
},
|
|
269
|
+
[
|
|
270
|
+
{
|
|
271
|
+
"color": "#ffffff",
|
|
272
|
+
"fontSize": 6,
|
|
273
|
+
"height": 12,
|
|
274
|
+
"lineHeight": 12,
|
|
275
|
+
},
|
|
276
|
+
undefined,
|
|
277
|
+
],
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
themeFontSize="medium"
|
|
281
|
+
themeFontWeight="regular"
|
|
282
|
+
themeIntent="body"
|
|
283
|
+
themeTypeface="neutral"
|
|
284
|
+
>
|
|
285
|
+
99+
|
|
286
|
+
</Text>
|
|
287
|
+
</View>
|
|
288
|
+
</View>
|
|
289
|
+
<View
|
|
290
|
+
pointerEvents="box-none"
|
|
291
|
+
position="bottom"
|
|
292
|
+
style={
|
|
293
|
+
[
|
|
294
|
+
{
|
|
295
|
+
"bottom": 0,
|
|
296
|
+
"elevation": 9999,
|
|
297
|
+
"flexDirection": "column-reverse",
|
|
298
|
+
"left": 0,
|
|
299
|
+
"paddingHorizontal": 24,
|
|
300
|
+
"paddingVertical": 16,
|
|
301
|
+
"position": "absolute",
|
|
302
|
+
"right": 0,
|
|
303
|
+
"top": 0,
|
|
304
|
+
},
|
|
305
|
+
undefined,
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
/>
|
|
309
|
+
</View>
|
|
310
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const DEFAULT_MAX_NUMBER = 99;
|
|
@@ -2,12 +2,12 @@ import { Animated } from 'react-native';
|
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
3
|
import { StyledView, StyledText, StyledIcon } from './StyledBadge';
|
|
4
4
|
import BadgeStatus from './Status';
|
|
5
|
+
import BadgeCount from './Count';
|
|
5
6
|
import { BasicBadgeProps, IconBadgeProps } from './types';
|
|
7
|
+
import { DEFAULT_MAX_NUMBER } from './constants';
|
|
6
8
|
|
|
7
9
|
export type BadgeProps = BasicBadgeProps | IconBadgeProps;
|
|
8
10
|
|
|
9
|
-
const DEFAULT_MAX_NUMBER = 99;
|
|
10
|
-
|
|
11
11
|
const getPaddingState = (content: string): 'narrowContent' | 'wideContent' =>
|
|
12
12
|
content.length > 1 ? 'wideContent' : 'narrowContent';
|
|
13
13
|
|
|
@@ -87,4 +87,5 @@ const Badge = ({
|
|
|
87
87
|
|
|
88
88
|
export default Object.assign(Badge, {
|
|
89
89
|
Status: BadgeStatus,
|
|
90
|
+
Count: BadgeCount,
|
|
90
91
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"activate":59000,"add-emoji":59001,"add-person":59002,"adjustment":59003,"alignment":59004,"antenna":59005,"archive":59006,"assignment-warning":59007,"bank":59008,"bell":59009,"billing":59010,"bolt":59011,"bookmark-added":59012,"bookmark-checked":59013,"bookmark":59014,"box-check":59015,"box":59016,"bpay":59017,"buildings":59018,"cake":59019,"calendar-clock":59020,"calendar":59021,"candy-box-menu":59022,"caret-down-small":59023,"caret-down":59024,"caret-left-small":59025,"caret-left":59026,"caret-right-small":59027,"caret-right":59028,"caret-up-small":59029,"caret-up":59030,"check-radio":59031,"circle-add":59032,"circle-cancel":59033,"circle-check":59034,"circle-down":59035,"circle-info":59036,"circle-left":59037,"circle-ok":59038,"circle-pencil":59039,"circle-question":59040,"circle-remove":59041,"circle-right":59042,"circle-up":59043,"circle-warning":59044,"clock-3":59045,"clock":59046,"cloud-download":59047,"cloud-upload":59048,"cog":59049,"coin":59050,"contacts":59051,"credit-card":59052,"diamond":59053,"direction-arrows":59054,"directory":59055,"document":59056,"dollar-coin-shine":59057,"dot":59058,"double-buildings":59059,"edit-template":59060,"envelope":59061,"exclude":59062,"expand-content":59063,"expense":59064,"explore_nearby":59065,"eye-circle":59066,"eye-invisible":59067,"eye":59068,"face-meh":59069,"face-sad":59070,"face-smiley":59071,"feed":59072,"feedbacks":59073,"file-certified":59074,"file-clone":59075,"file-copy":59076,"file-csv":59077,"file-dispose":59078,"file-doc":59079,"file-excel":59080,"file-export":59081,"file-lock":59082,"file-pdf":59083,"file-powerpoint":59084,"file-search":59085,"file-secured":59086,"file-sheets":59087,"file-slide":59088,"file-verified":59089,"file-word":59090,"file":59091,"filter":59092,"folder-user":59093,"folder":59094,"format-bold":59095,"format-heading1":59096,"format-heading2":59097,"format-italic":59098,"format-list-bulleted":59099,"format-list-numbered":59100,"format-underlined":59101,"funnel-filter":59102,"global-dollar":59103,"globe":59104,"graduation-cap":59105,"graph":59106,"happy-sun":59107,"health-bag":59108,"heart":59109,"hero-points":59110,"home":59111,"image":59112,"import":59113,"incident-siren":59114,"instapay-daily":59115,"instapay-now":59116,"instapay":59117,"list":59118,"loading-2":59119,"loading":59120,"location-on":59121,"location":59122,"lock":59123,"looks-one":59124,"looks-two":59125,"media-content":59126,"menu":59127,"money-notes":59128,"moneybag":59129,"moon":59130,"multiple-stars":59131,"multiple-users":59132,"near-me":59133,"node":59134,"open-folder":59135,"paperclip-vertical":59136,"paperclip":59137,"payment-summary":59138,"pencil":59139,"phone":59140,"piggy-bank":59141,"plane-up":59142,"plane":59143,"play-arrow":59144,"play-circle":59145,"print":59146,"raising-hands":59147,"reply-arrow":59148,"reply":59149,"reschedule":59150,"rostering":59151,"salary-sacrifice":59152,"save":59153,"schedule-send":59154,"schedule":59155,"search-person":59156,"search":59157,"send":59158,"speaker-active":59159,"speaker":59160,"star-award":59161,"star-badge":59162,"star-circle":59163,"star-medal":59164,"star":59165,"steps-circle":59166,"stopwatch":59167,"suitcase":59168,"surfing":59169,"survey":59170,"swag-pillar-benefit":59171,"swag-pillar-career":59172,"swag-pillar-money":59173,"swag-pillar-work":59174,"swag":59175,"swipe-right":59176,"switch":59177,"tag":59178,"target":59179,"teams":59180,"thumb-down":59181,"timesheet":59182,"touch-id":59183,"trash-bin":59184,"unlock":59185,"user":59186,"video-1":59187,"video-2":59188,"wallet":59189,"warning":59190,"accommodation-outlined":59191,"activate-outlined":59192,"add-credit-card-outlined":59193,"add-person-outlined":59194,"add-section-outlined":59195,"add-time-outlined":59196,"add":59197,"adjustment-outlined":59198,"afternoon-outlined":59199,"ai-outlined":59200,"alignment-2-outlined":59201,"alignment-outlined":59202,"all-caps":59203,"application-outlined":59204,"arrow-down":59205,"arrow-downwards":59206,"arrow-left":59207,"arrow-leftwards":59208,"arrow-right":59209,"arrow-rightwards":59210,"arrow-up":59211,"arrow-upwards":59212,"article-outlined":59213,"at-sign":59214,"auto-graph-outlined":59215,"automotive-outlined":59216,"bakery-outlined":59217,"bar-outlined":59218,"beauty-outlined":59219,"beer-outlined":59220,"bell-active-outlined":59221,"bell-outlined":59222,"bell-slash-outlined":59223,"bill-management-outlined":59224,"billing-outlined":59225,"body-outlined":59226,"bold":59227,"bolt-outlined":59228,"book-outlined":59229,"bookmark-added-outlined":59230,"bookmark-checked-outlined":59231,"bookmark-outlined":59232,"box-1-outlined":59233,"box-check-outlined":59234,"box-outlined":59235,"bullet-points":59236,"cake-outlined":59237,"calculator-outlined":59238,"calendar-dates-outlined":59239,"calendar-star-outlined":59240,"call-outlined":59241,"call-split-outlined":59242,"camera-outlined":59243,"cancel":59244,"car-forward-outlined":59245,"cashback-outlined":59246,"charging-station-outlined":59247,"chat-bubble-outlined":59248,"chat-unread-outlined":59249,"checkmark":59250,"circle-add-outlined":59251,"circle-cancel-outlined":59252,"circle-down-outlined":59253,"circle-info-outlined":59254,"circle-left-outlined":59255,"circle-ok-outlined":59256,"circle-question-outlined":59257,"circle-remove-outlined":59258,"circle-right-outlined":59259,"circle-up-outlined":59260,"circle-warning-outlined":59261,"clock-2-outlined":59262,"clock-in-outlined":59263,"clock-out-outlined":59264,"clock-outlined":59265,"cog-outlined":59266,"coin-outlined":59267,"coin-super-outlined":59268,"comment-outlined":59269,"contacts-outlined":59270,"contacts-user-outlined":59271,"credit-card-outlined":59272,"cultural-site-outlined":59273,"cup-outlined":59274,"dentistry-outlined":59275,"direction-arrows-outlined":59276,"directory-outlined":59277,"document-outlined":59278,"dollar-box-outlined":59279,"dollar-card-outlined":59280,"dollar-coin-shine-outlined":59281,"dollar-credit-card-outlined":59282,"dollar-sign":59283,"double-buildings-outlined":59284,"double-left-arrows":59285,"double-right-arrows":59286,"download-box-outlined":59287,"download-outlined":59288,"edit-template-outlined":59289,"electronics-outlined":59290,"email-outlined":59291,"end-break-outlined":59292,"enter-arrow":59293,"entertainment-outlined":59294,"envelope-outlined":59295,"evening-outlined":59296,"expense-approval-outlined":59297,"expense-outlined":59298,"explore-outlined":59299,"extension-outlined":59300,"external-link":59301,"eye-invisible-outlined":59302,"eye-outlined":59303,"face-id":59304,"face-meh-outlined":59305,"face-open-smiley-outlined":59306,"face-sad-outlined":59307,"face-smiley-outlined":59308,"fastfood-outlined":59309,"feed-outlined":59310,"file-certified-outlined":59311,"file-clone-outlined":59312,"file-copy-outlined":59313,"file-dispose-outlined":59314,"file-dollar-certified-outlined":59315,"file-dollar-outlined":59316,"file-download-outlined":59317,"file-export-outlined":59318,"file-lock-outlined":59319,"file-outlined":59320,"file-search-outlined":59321,"file-secured-outlined":59322,"file-statutory-outlined":59323,"file-verified-outlined":59324,"filter-outlined":59325,"fitness-outlined":59326,"folder-outlined":59327,"folder-upload-outlined":59328,"folder-user-outlined":59329,"form-outlined":59330,"funnel-filter-outline":59331,"goal-outlined":59332,"graph-outlined":59333,"grocery-outlined":59334,"hand-holding-user-outlined":59335,"handshake-outlined":59336,"happy-sun-outlined":59337,"health-bag-outlined":59338,"heart-outlined":59339,"home-active-outlined":59340,"home-outlined":59341,"id-card-outlined":59342,"image-outlined":59343,"import-outlined":59344,"instapay-outlined":59345,"italic":59346,"job-search-outlined":59347,"leave-approval-outlined":59348,"link-1":59349,"link-2":59350,"list-outlined":59351,"live-help-outlined":59352,"local_mall_outlined":59353,"location-on-outlined":59354,"location-outlined":59355,"lock-outlined":59356,"locked-file-outlined":59357,"log-out":59358,"mail-outlined":59359,"map-outlined":59360,"media-content-outlined":59361,"menu-close":59362,"menu-expand":59363,"menu-fold-outlined":59364,"menu-unfold-outlined":59365,"moneybag-outlined":59366,"moon-outlined":59367,"more-horizontal":59368,"more-vertical":59369,"morning-outlined":59370,"multiple-folders-outlined":59371,"multiple-users-outlined":59372,"near-me-outlined":59373,"node-outlined":59374,"number-points":59375,"number":59376,"overview-outlined":59377,"park-outlined":59378,"payment-summary-outlined":59379,"payslip-outlined":59380,"pencil-outlined":59381,"percentage":59382,"phone-outlined":59383,"piggy-bank-outlined":59384,"plane-outlined":59385,"play-circle-outlined":59386,"print-outlined":59387,"propane-tank-outlined":59388,"qr-code-outlined":59389,"qualification-outlined":59390,"re-assign":59391,"redeem":59392,"refresh":59393,"remove":59394,"reply-outlined":59395,"restart":59396,"restaurant-outlined":59397,"resume-outlined":59398,"return-arrow":59399,"rostering-outlined":59400,"safety-outlined":59401,"save-outlined":59402,"schedule-outlined":59403,"search-outlined":59404,"search-secured-outlined":59405,"send-outlined":59406,"share-1":59407,"share-2":59408,"share-outlined-2":59409,"share-outlined":59410,"shop-outlined":59411,"shopping_basket_outlined":59412,"show-chart-outlined":59413,"single-down-arrow":59414,"single-left-arrow":59415,"single-right-arrow":59416,"single-up-arrow":59417,"smart-match-outlined":59418,"sparkle-outlined":59419,"speaker-active-outlined":59420,"speaker-outlined":59421,"star-circle-outlined":59422,"star-outlined":59423,"start-break-outlined":59424,"stash-outlined":59425,"stopwatch-outlined":59426,"strikethrough":59427,"styler-outlined":59428,"suitcase-clock-outlined":59429,"suitcase-outlined":59430,"survey-outlined":59431,"switch-outlined":59432,"sync":59433,"tag-outlined":59434,"target-outlined":59435,"tennis-outlined":59436,"thumb-down-outlined":59437,"ticket-outlined":59438,"timesheet-outlined":59439,"timesheets-outlined":59440,"today-outlined":59441,"transfer":59442,"transportation-outlined":59443,"trash-bin-outlined":59444,"umbrela-outlined":59445,"unavailability-outlined":59446,"unavailable":59447,"underline":59448,"union-outlined":59449,"unlock-outlined":59450,"upload-outlined":59451,"user-circle-outlined":59452,"user-gear-outlined":59453,"user-outlined":59454,"user-rectangle-outlined":59455,"video-1-outlined":59456,"video-2-outlined":59457,"volunteer-outlined":59458,"wallet-outlined":59459,"wellness-outlined":59460}
|
|
1
|
+
{"activate":59000,"add-emoji":59001,"add-person":59002,"adjustment":59003,"alignment":59004,"antenna":59005,"archive":59006,"assignment-warning":59007,"bank":59008,"bell":59009,"billing":59010,"bolt":59011,"bookmark-added":59012,"bookmark-checked":59013,"bookmark":59014,"box-check":59015,"box":59016,"bpay":59017,"buildings":59018,"cake":59019,"calendar-clock":59020,"calendar":59021,"candy-box-menu":59022,"caret-down-small":59023,"caret-down":59024,"caret-left-small":59025,"caret-left":59026,"caret-right-small":59027,"caret-right":59028,"caret-up-small":59029,"caret-up":59030,"check-radio":59031,"circle-add":59032,"circle-cancel":59033,"circle-check":59034,"circle-down":59035,"circle-info":59036,"circle-left":59037,"circle-ok":59038,"circle-pencil":59039,"circle-question":59040,"circle-remove":59041,"circle-right":59042,"circle-up":59043,"circle-warning":59044,"clock-3":59045,"clock":59046,"cloud-download":59047,"cloud-upload":59048,"cog":59049,"coin":59050,"contacts":59051,"credit-card":59052,"diamond":59053,"direction-arrows":59054,"directory":59055,"document":59056,"dollar-coin-shine":59057,"dot":59058,"double-buildings":59059,"edit-template":59060,"envelope":59061,"exclude":59062,"expand-content":59063,"expense":59064,"explore_nearby":59065,"eye-circle":59066,"eye-invisible":59067,"eye":59068,"face-meh":59069,"face-sad":59070,"face-smiley":59071,"feed":59072,"feedbacks":59073,"file-certified":59074,"file-clone":59075,"file-copy":59076,"file-csv":59077,"file-dispose":59078,"file-doc":59079,"file-excel":59080,"file-export":59081,"file-lock":59082,"file-pdf":59083,"file-powerpoint":59084,"file-search":59085,"file-secured":59086,"file-sheets":59087,"file-slide":59088,"file-verified":59089,"file-word":59090,"file":59091,"filter":59092,"folder-user":59093,"folder":59094,"format-bold":59095,"format-heading1":59096,"format-heading2":59097,"format-italic":59098,"format-list-bulleted":59099,"format-list-numbered":59100,"format-underlined":59101,"funnel-filter":59102,"global-dollar":59103,"globe":59104,"graduation-cap":59105,"graph":59106,"happy-sun":59107,"health-bag":59108,"heart":59109,"hero-points":59110,"home":59111,"image":59112,"import":59113,"incident-siren":59114,"instapay-daily":59115,"instapay-now":59116,"instapay":59117,"list":59118,"loading-2":59119,"loading":59120,"location-on":59121,"location":59122,"lock":59123,"looks-one":59124,"looks-two":59125,"media-content":59126,"menu":59127,"money-notes":59128,"moneybag":59129,"moon":59130,"multiple-stars":59131,"multiple-users":59132,"near-me":59133,"node":59134,"open-folder":59135,"paperclip-vertical":59136,"paperclip":59137,"payment-summary":59138,"pencil":59139,"phone":59140,"piggy-bank":59141,"plane-up":59142,"plane":59143,"play-arrow":59144,"play-circle":59145,"print":59146,"raising-hands":59147,"reply-arrow":59148,"reply":59149,"reschedule":59150,"rostering":59151,"salary-sacrifice":59152,"save":59153,"schedule-send":59154,"schedule":59155,"search-person":59156,"search":59157,"send":59158,"speaker-active":59159,"speaker":59160,"star-award":59161,"star-badge":59162,"star-circle":59163,"star-medal":59164,"star":59165,"steps-circle":59166,"stopwatch":59167,"suitcase":59168,"surfing":59169,"survey":59170,"swag-pillar-benefit":59171,"swag-pillar-career":59172,"swag-pillar-money":59173,"swag-pillar-work":59174,"swag":59175,"swipe-right":59176,"switch":59177,"tag":59178,"target":59179,"teams":59180,"thumb-down":59181,"timesheet":59182,"touch-id":59183,"trash-bin":59184,"unlock":59185,"user":59186,"video-1":59187,"video-2":59188,"wallet":59189,"warning":59190,"accommodation-outlined":59191,"activate-outlined":59192,"add-credit-card-outlined":59193,"add-person-outlined":59194,"add-section-outlined":59195,"add-time-outlined":59196,"add":59197,"adjustment-outlined":59198,"afternoon-outlined":59199,"ai-outlined":59200,"alignment-2-outlined":59201,"alignment-outlined":59202,"all-caps":59203,"application-outlined":59204,"arrow-down":59205,"arrow-downwards":59206,"arrow-left":59207,"arrow-leftwards":59208,"arrow-right":59209,"arrow-rightwards":59210,"arrow-up":59211,"arrow-upwards":59212,"article-outlined":59213,"at-sign":59214,"auto-graph-outlined":59215,"automotive-outlined":59216,"bakery-outlined":59217,"bar-outlined":59218,"beauty-outlined":59219,"beer-outlined":59220,"bell-active-outlined":59221,"bell-outlined":59222,"bell-slash-outlined":59223,"bill-management-outlined":59224,"billing-outlined":59225,"body-outlined":59226,"bold":59227,"bolt-outlined":59228,"book-outlined":59229,"bookmark-added-outlined":59230,"bookmark-checked-outlined":59231,"bookmark-outlined":59232,"box-1-outlined":59233,"box-check-outlined":59234,"box-outlined":59235,"bullet-points":59236,"cake-outlined":59237,"calculator-outlined":59238,"calendar-dates-outlined":59239,"calendar-star-outlined":59240,"call-outlined":59241,"call-split-outlined":59242,"camera-outlined":59243,"cancel":59244,"car-forward-outlined":59245,"cashback-outlined":59246,"charging-station-outlined":59247,"chat-bubble-outlined":59248,"chat-unread-outlined":59249,"checkmark":59250,"circle-add-outlined":59251,"circle-cancel-outlined":59252,"circle-down-outlined":59253,"circle-info-outlined":59254,"circle-left-outlined":59255,"circle-ok-outlined":59256,"circle-question-outlined":59257,"circle-remove-outlined":59258,"circle-right-outlined":59259,"circle-up-outlined":59260,"circle-warning-outlined":59261,"clock-2-outlined":59262,"clock-in-outlined":59263,"clock-out-outlined":59264,"clock-outlined":59265,"cog-outlined":59266,"coin-outlined":59267,"coin-super-outlined":59268,"comment-outlined":59269,"contacts-outlined":59270,"contacts-user-outlined":59271,"credit-card-outlined":59272,"cultural-site-outlined":59273,"cup-outlined":59274,"dentistry-outlined":59275,"direction-arrows-outlined":59276,"directory-outlined":59277,"document-outlined":59278,"dollar-box-outlined":59279,"dollar-card-outlined":59280,"dollar-coin-shine-outlined":59281,"dollar-credit-card-outlined":59282,"dollar-sign":59283,"double-buildings-outlined":59284,"double-left-arrows":59285,"double-right-arrows":59286,"download-box-outlined":59287,"download-outlined":59288,"edit-template-outlined":59289,"electronics-outlined":59290,"email-outlined":59291,"end-break-outlined":59292,"enter-arrow":59293,"entertainment-outlined":59294,"envelope-outlined":59295,"evening-outlined":59296,"expense-approval-outlined":59297,"expense-outlined":59298,"explore-outlined":59299,"extension-outlined":59300,"external-link":59301,"eye-invisible-outlined":59302,"eye-outlined":59303,"face-id":59304,"face-meh-outlined":59305,"face-open-smiley-outlined":59306,"face-sad-outlined":59307,"face-smiley-outlined":59308,"fastfood-outlined":59309,"feed-outlined":59310,"file-certified-outlined":59311,"file-clone-outlined":59312,"file-copy-outlined":59313,"file-dispose-outlined":59314,"file-dollar-certified-outlined":59315,"file-dollar-outlined":59316,"file-download-outlined":59317,"file-export-outlined":59318,"file-lock-outlined":59319,"file-outlined":59320,"file-search-outlined":59321,"file-secured-outlined":59322,"file-statutory-outlined":59323,"file-verified-outlined":59324,"filter-outlined":59325,"fitness-outlined":59326,"folder-outlined":59327,"folder-upload-outlined":59328,"folder-user-outlined":59329,"form-outlined":59330,"funnel-filter-outline":59331,"goal-outlined":59332,"graph-outlined":59333,"grocery-outlined":59334,"hand-holding-user-outlined":59335,"handshake-outlined":59336,"happy-sun-outlined":59337,"health-bag-outlined":59338,"heart-outlined":59339,"home-active-outlined":59340,"home-outlined":59341,"id-card-outlined":59342,"image-outlined":59343,"import-outlined":59344,"instapay-outlined":59345,"italic":59346,"job-search-outlined":59347,"leave-approval-outlined":59348,"link-1":59349,"link-2":59350,"list-outlined":59351,"live-help-outlined":59352,"local_mall_outlined":59353,"location-on-outlined":59354,"location-outlined":59355,"lock-outlined":59356,"locked-file-outlined":59357,"log-out":59358,"mail-outlined":59359,"map-outlined":59360,"media-content-outlined":59361,"menu-close":59362,"menu-expand":59363,"menu-fold-outlined":59364,"menu-unfold-outlined":59365,"moneybag-outlined":59366,"moon-outlined":59367,"more-horizontal":59368,"more-vertical":59369,"morning-outlined":59370,"multiple-folders-outlined":59371,"multiple-users-outlined":59372,"near-me-outlined":59373,"node-outlined":59374,"number-points":59375,"number":59376,"overview-outlined":59377,"park-outlined":59378,"payment-summary-outlined":59379,"payslip-outlined":59380,"pencil-outlined":59381,"percentage":59382,"phone-outlined":59383,"piggy-bank-outlined":59384,"plane-outlined":59385,"play-circle-outlined":59386,"print-outlined":59387,"propane-tank-outlined":59388,"qr-code-outlined":59389,"qualification-outlined":59390,"re-assign":59391,"redeem":59392,"refresh":59393,"remove":59394,"reply-outlined":59395,"restart":59396,"restaurant-outlined":59397,"resume-outlined":59398,"return-arrow":59399,"rostering-outlined":59400,"safety-outlined":59401,"save-outlined":59402,"schedule-outlined":59403,"search-outlined":59404,"search-secured-outlined":59405,"send-outlined":59406,"share-1":59407,"share-2":59408,"share-outlined-2":59409,"share-outlined":59410,"shield-check-outlined":59411,"shop-outlined":59412,"shopping_basket_outlined":59413,"show-chart-outlined":59414,"single-down-arrow":59415,"single-left-arrow":59416,"single-right-arrow":59417,"single-up-arrow":59418,"smart-match-outlined":59419,"sparkle-outlined":59420,"speaker-active-outlined":59421,"speaker-outlined":59422,"star-circle-outlined":59423,"star-outlined":59424,"start-break-outlined":59425,"stash-outlined":59426,"stopwatch-outlined":59427,"strikethrough":59428,"styler-outlined":59429,"suitcase-clock-outlined":59430,"suitcase-outlined":59431,"survey-outlined":59432,"switch-outlined":59433,"sync":59434,"tag-outlined":59435,"target-outlined":59436,"tennis-outlined":59437,"thumb-down-outlined":59438,"ticket-outlined":59439,"timesheet-outlined":59440,"timesheets-outlined":59441,"today-outlined":59442,"transfer":59443,"transportation-outlined":59444,"trash-bin-outlined":59445,"umbrela-outlined":59446,"unavailability-outlined":59447,"unavailable":59448,"underline":59449,"union-outlined":59450,"unlock-outlined":59451,"upload-outlined":59452,"user-circle-outlined":59453,"user-gear-outlined":59454,"user-outlined":59455,"user-rectangle-outlined":59456,"video-1-outlined":59457,"video-2-outlined":59458,"volunteer-outlined":59459,"wallet-outlined":59460,"wellness-outlined":59461}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { View } from 'react-native';
|
|
2
2
|
import styled from '@emotion/native';
|
|
3
|
-
import Typography from '
|
|
3
|
+
import Typography from '../../Typography';
|
|
4
4
|
|
|
5
5
|
type ThemeVariant = 'light' | 'dark';
|
|
6
6
|
|
|
@@ -34,4 +34,13 @@ const StyledDescription = styled(Typography.Body)<{
|
|
|
34
34
|
: theme.__hd__.empty.colors.subduedText,
|
|
35
35
|
}));
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
const StyledEmptyImageContainer = styled(View)(({ theme }) => ({
|
|
38
|
+
marginBottom: theme.__hd__.empty.space.imageMargin,
|
|
39
|
+
}));
|
|
40
|
+
|
|
41
|
+
export {
|
|
42
|
+
StyledWrapper,
|
|
43
|
+
StyledTitle,
|
|
44
|
+
StyledDescription,
|
|
45
|
+
StyledEmptyImageContainer,
|
|
46
|
+
};
|