@hero-design/rn 7.1.3-alpha5 → 7.1.3-alpha8
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/.eslintrc.json +0 -6
- package/.expo/packager-info.json +1 -1
- package/babel.config.js +0 -14
- package/es/index.js +2787 -8941
- package/jest-setup.ts +0 -1
- package/jest.config.js +2 -4
- package/lib/index.js +2822 -8956
- package/package.json +5 -7
- package/playground/components/BottomNavigation.tsx +14 -11
- package/playground/components/Button.tsx +67 -0
- package/playground/components/Card.tsx +141 -107
- package/playground/components/Tabs.tsx +44 -0
- package/playground/index.tsx +13 -7
- package/src/components/Badge/StyledBadge.tsx +19 -21
- package/src/components/Badge/__tests__/Badge.spec.tsx +9 -18
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +76 -96
- package/src/components/Badge/index.tsx +1 -1
- package/src/components/BottomNavigation/StyledBottomNavigation.tsx +44 -42
- package/src/components/BottomNavigation/__tests__/__snapshots__/{BottomNavigation.spec.tsx.snap → index.spec.tsx.snap} +130 -96
- package/src/components/BottomNavigation/__tests__/{BottomNavigation.spec.tsx → index.spec.tsx} +4 -4
- package/src/components/BottomNavigation/index.tsx +28 -32
- package/src/components/Button/IconButton.tsx +62 -0
- package/src/components/Button/__tests__/__snapshots__/index.spec.tsx.snap +46 -0
- package/src/components/Button/__tests__/index.spec.tsx +23 -0
- package/src/components/Button/index.tsx +5 -0
- package/src/components/Card/StyledCard.tsx +6 -6
- package/src/components/Card/__tests__/StyledCard.spec.tsx +2 -7
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +8 -11
- package/src/components/Card/__tests__/__snapshots__/{Card.spec.tsx.snap → index.spec.tsx.snap} +2 -8
- package/src/components/Card/__tests__/index.spec.tsx +35 -0
- package/src/components/Divider/StyledDivider.tsx +18 -60
- package/src/components/Divider/__tests__/StyledDivider.spec.tsx +5 -10
- package/src/components/Divider/__tests__/__snapshots__/StyledDivider.spec.tsx.snap +106 -70
- package/src/components/Divider/index.tsx +1 -1
- package/src/components/FAB/ActionGroup/ActionItem.tsx +2 -4
- package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +36 -37
- package/src/components/FAB/ActionGroup/StyledActionItem.tsx +26 -24
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +271 -245
- package/src/components/FAB/ActionGroup/__tests__/index.spec.tsx +29 -33
- package/src/components/FAB/ActionGroup/index.tsx +1 -5
- package/src/components/FAB/AnimatedFABIcon.tsx +1 -1
- package/src/components/FAB/FAB.tsx +5 -9
- package/src/components/FAB/StyledFAB.tsx +22 -0
- package/src/components/FAB/__tests__/AnimatedFABIcon.spec.tsx +3 -6
- package/src/components/FAB/__tests__/StyledFAB.spec.tsx +24 -0
- package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +14 -10
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +72 -0
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +16 -17
- package/src/components/FAB/__tests__/index.spec.tsx +21 -26
- package/src/components/Icon/HeroIcon/index.tsx +5 -7
- package/src/components/Icon/__tests__/__snapshots__/{Icon.spec.tsx.snap → index.spec.tsx.snap} +21 -12
- package/src/components/Icon/__tests__/index.spec.tsx +25 -0
- package/src/components/Icon/index.tsx +1 -1
- package/src/components/Tabs/StyledTabs.tsx +70 -0
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +321 -0
- package/src/components/Tabs/__tests__/index.spec.tsx +79 -0
- package/src/components/Tabs/index.tsx +185 -0
- package/src/components/Typography/Text/StyledText.tsx +19 -64
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +90 -63
- package/src/emotion.d.ts +6 -0
- package/src/index.ts +9 -3
- package/src/testHelpers/renderWithTheme.tsx +2 -1
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +70 -48
- package/src/theme/components/badge.ts +10 -9
- package/src/theme/components/bottomNavigation.ts +7 -3
- package/src/theme/components/card.ts +2 -2
- package/src/theme/components/divider.ts +6 -6
- package/src/theme/components/fab.ts +19 -17
- package/src/theme/components/tabs.ts +20 -0
- package/src/theme/components/typography.ts +4 -4
- package/src/theme/global/borders.ts +8 -2
- package/src/theme/global/colors.ts +3 -1
- package/src/theme/global/index.ts +31 -17
- package/src/theme/global/scale.ts +18 -0
- package/src/theme/global/space.ts +23 -13
- package/src/theme/global/typography.ts +71 -27
- package/src/theme/index.ts +29 -13
- package/src/types.ts +7 -0
- package/src/utils/__tests__/scale.spec.ts +3 -3
- package/testUtils/setup.ts +11 -0
- package/tsconfig.json +1 -5
- package/types/playground/components/BottomNavigation.d.ts +2 -2
- package/types/playground/components/Button.d.ts +2 -0
- package/types/playground/components/Tabs.d.ts +2 -0
- package/types/src/components/Badge/StyledBadge.d.ts +16 -5
- package/types/src/components/Badge/index.d.ts +1 -1
- package/types/src/components/BottomNavigation/StyledBottomNavigation.d.ts +44 -9
- package/types/src/components/{Typography/Text/__test__ → BottomNavigation/__tests__}/index.spec.d.ts +0 -0
- package/types/src/components/BottomNavigation/index.d.ts +19 -14
- package/types/src/components/Button/IconButton.d.ts +34 -0
- package/types/{theme → src/components/Button}/__tests__/index.spec.d.ts +0 -0
- package/types/src/components/Button/index.d.ts +4 -0
- package/types/src/components/Card/StyledCard.d.ts +7 -1
- package/types/{components/Card/__tests__/Card.spec.d.ts → src/components/Card/__tests__/index.spec.d.ts} +0 -0
- package/types/src/components/Divider/StyledDivider.d.ts +8 -2
- package/types/src/components/Divider/index.d.ts +1 -1
- package/types/src/components/FAB/ActionGroup/StyledActionGroup.d.ts +25 -7
- package/types/src/components/FAB/ActionGroup/StyledActionItem.d.ts +11 -2
- package/types/src/components/FAB/ActionGroup/index.d.ts +1 -1
- package/types/src/components/FAB/FAB.d.ts +4 -4
- package/types/src/components/FAB/StyledFAB.d.ts +14 -0
- package/types/{components/Card/__tests__/StyledCard.spec.d.ts → src/components/FAB/__tests__/StyledFAB.spec.d.ts} +0 -0
- package/types/src/components/Icon/HeroIcon/index.d.ts +8 -2
- package/types/{components/Divider/__tests__/StyledDivider.spec.d.ts → src/components/Icon/__tests__/index.spec.d.ts} +0 -0
- package/types/src/components/Icon/index.d.ts +1 -1
- package/types/src/components/Icon/utils.d.ts +1 -1
- package/types/src/components/Tabs/StyledTabs.d.ts +55 -0
- package/types/{components/ExampleComponent/__tests__/StyledView.spec.d.ts → src/components/Tabs/__tests__/index.spec.d.ts} +0 -0
- package/types/src/components/Tabs/index.d.ts +45 -0
- package/types/src/components/Typography/Text/StyledText.d.ts +8 -2
- package/types/src/index.d.ts +6 -3
- package/types/src/theme/components/badge.d.ts +8 -7
- package/types/src/theme/components/bottomNavigation.d.ts +8 -2
- package/types/src/theme/components/card.d.ts +2 -2
- package/types/src/theme/components/divider.d.ts +6 -6
- package/types/src/theme/components/fab.d.ts +19 -17
- package/types/src/theme/components/tabs.d.ts +15 -0
- package/types/src/theme/components/typography.d.ts +4 -4
- package/types/src/theme/global/borders.d.ts +4 -3
- package/types/src/theme/global/colors.d.ts +2 -2
- package/types/src/theme/global/index.d.ts +10 -45
- package/types/src/theme/global/scale.d.ts +8 -0
- package/types/src/theme/global/space.d.ts +8 -7
- package/types/src/theme/global/typography.d.ts +9 -16
- package/types/src/theme/index.d.ts +4 -2
- package/types/src/types.d.ts +5 -0
- package/lib/assets/fonts/be-vietnam-pro-light.ttf +0 -0
- package/lib/assets/fonts/be-vietnam-pro-regular.ttf +0 -0
- package/lib/assets/fonts/be-vietnam-pro-semibold.ttf +0 -0
- package/src/components/Card/__tests__/Card.spec.tsx +0 -36
- package/src/components/FAB/StyledFABContainer.tsx +0 -14
- package/src/components/FAB/StyledFABIcon.tsx +0 -9
- package/src/components/FAB/__tests__/StyledFABContainer.spec.tsx +0 -18
- package/src/components/FAB/__tests__/StyledFABIcon.spec.tsx +0 -16
- package/src/components/FAB/__tests__/__snapshots__/StyledFABContainer.spec.tsx.snap +0 -46
- package/src/components/FAB/__tests__/__snapshots__/StyledFABIcon.spec.tsx.snap +0 -21
- package/src/components/Icon/__tests__/Icon.spec.tsx +0 -36
- package/src/styled-components.ts +0 -14
- package/src/styled.d.ts +0 -7
- package/types/components/Card/StyledCard.d.ts +0 -3
- package/types/components/Card/index.d.ts +0 -5
- package/types/components/Divider/StyledDivider.d.ts +0 -7
- package/types/components/Divider/index.d.ts +0 -12
- package/types/components/ExampleComponent/StyledView.d.ts +0 -7
- package/types/components/ExampleComponent/index.d.ts +0 -16
- package/types/index.d.ts +0 -5
- package/types/src/components/BottomNavigation/__tests__/BottomNavigation.spec.d.ts +0 -1
- package/types/src/components/Card/__tests__/Card.spec.d.ts +0 -1
- package/types/src/components/FAB/StyledFABContainer.d.ts +0 -3
- package/types/src/components/FAB/StyledFABIcon.d.ts +0 -3
- package/types/src/components/FAB/__tests__/StyledFABContainer.spec.d.ts +0 -1
- package/types/src/components/FAB/__tests__/StyledFABIcon.spec.d.ts +0 -1
- package/types/src/components/Icon/__tests__/Icon.spec.d.ts +0 -1
- package/types/src/components/Typography/Text/__test__/StyledText.spec.d.ts +0 -1
- package/types/src/styled-components.d.ts +0 -6
- package/types/styled-components.d.ts +0 -6
- package/types/theme/components/card.d.ts +0 -10
- package/types/theme/components/divider.d.ts +0 -17
- package/types/theme/components/exampleComponent.d.ts +0 -14
- package/types/theme/global/borders.d.ts +0 -4
- package/types/theme/global/colors.d.ts +0 -26
- package/types/theme/global/index.d.ts +0 -63
- package/types/theme/global/space.d.ts +0 -12
- package/types/theme/global/typography.d.ts +0 -21
- package/types/theme/index.d.ts +0 -13
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import { ThemeProvider, theme } from '../../../index';
|
|
2
|
+
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
4
3
|
import Badge from '..';
|
|
5
4
|
|
|
6
5
|
describe('Badge', () => {
|
|
7
6
|
it('has success style when intent is success', () => {
|
|
8
|
-
const { getByText, toJSON } =
|
|
9
|
-
<
|
|
10
|
-
<Badge content="APPROVED" intent="success" />
|
|
11
|
-
</ThemeProvider>
|
|
7
|
+
const { getByText, toJSON } = renderWithTheme(
|
|
8
|
+
<Badge content="APPROVED" intent="success" />
|
|
12
9
|
);
|
|
13
10
|
|
|
14
11
|
expect(toJSON()).toMatchSnapshot();
|
|
@@ -16,10 +13,8 @@ describe('Badge', () => {
|
|
|
16
13
|
});
|
|
17
14
|
|
|
18
15
|
it('has warning style when intent is warning', () => {
|
|
19
|
-
const { getByText, toJSON } =
|
|
20
|
-
<
|
|
21
|
-
<Badge content="PENDING" intent="warning" />
|
|
22
|
-
</ThemeProvider>
|
|
16
|
+
const { getByText, toJSON } = renderWithTheme(
|
|
17
|
+
<Badge content="PENDING" intent="warning" />
|
|
23
18
|
);
|
|
24
19
|
|
|
25
20
|
expect(toJSON()).toMatchSnapshot();
|
|
@@ -27,10 +22,8 @@ describe('Badge', () => {
|
|
|
27
22
|
});
|
|
28
23
|
|
|
29
24
|
it('has danger style when intent is danger', () => {
|
|
30
|
-
const { getByText, toJSON } =
|
|
31
|
-
<
|
|
32
|
-
<Badge content="DECLINED" intent="danger" />
|
|
33
|
-
</ThemeProvider>
|
|
25
|
+
const { getByText, toJSON } = renderWithTheme(
|
|
26
|
+
<Badge content="DECLINED" intent="danger" />
|
|
34
27
|
);
|
|
35
28
|
|
|
36
29
|
expect(toJSON()).toMatchSnapshot();
|
|
@@ -38,10 +31,8 @@ describe('Badge', () => {
|
|
|
38
31
|
});
|
|
39
32
|
|
|
40
33
|
it('has info style when intent is info', () => {
|
|
41
|
-
const { getByText, toJSON } =
|
|
42
|
-
<
|
|
43
|
-
<Badge content="SUBMITTED" intent="info" />
|
|
44
|
-
</ThemeProvider>
|
|
34
|
+
const { getByText, toJSON } = renderWithTheme(
|
|
35
|
+
<Badge content="SUBMITTED" intent="info" />
|
|
45
36
|
);
|
|
46
37
|
|
|
47
38
|
expect(toJSON()).toMatchSnapshot();
|
|
@@ -3,35 +3,30 @@
|
|
|
3
3
|
exports[`Badge has danger style when intent is danger 1`] = `
|
|
4
4
|
<View
|
|
5
5
|
style={
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"borderTopLeftRadius": 4,
|
|
18
|
-
"borderTopRightRadius": 4,
|
|
19
|
-
"borderTopWidth": 1,
|
|
20
|
-
"paddingBottom": 4,
|
|
21
|
-
"paddingLeft": 8,
|
|
22
|
-
"paddingRight": 8,
|
|
23
|
-
"paddingTop": 4,
|
|
24
|
-
}
|
|
6
|
+
Array [
|
|
7
|
+
Object {
|
|
8
|
+
"backgroundColor": "#fcebe7",
|
|
9
|
+
"borderColor": "#de350b",
|
|
10
|
+
"borderRadius": 4,
|
|
11
|
+
"borderWidth": 1,
|
|
12
|
+
"paddingHorizontal": 8,
|
|
13
|
+
"paddingVertical": 2,
|
|
14
|
+
},
|
|
15
|
+
undefined,
|
|
16
|
+
]
|
|
25
17
|
}
|
|
26
18
|
themeIntent="danger"
|
|
27
19
|
>
|
|
28
20
|
<Text
|
|
29
21
|
style={
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
Array [
|
|
23
|
+
Object {
|
|
24
|
+
"color": "#de350b",
|
|
25
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
26
|
+
"fontSize": 12,
|
|
27
|
+
},
|
|
28
|
+
undefined,
|
|
29
|
+
]
|
|
35
30
|
}
|
|
36
31
|
themeIntent="danger"
|
|
37
32
|
>
|
|
@@ -43,35 +38,30 @@ exports[`Badge has danger style when intent is danger 1`] = `
|
|
|
43
38
|
exports[`Badge has info style when intent is info 1`] = `
|
|
44
39
|
<View
|
|
45
40
|
style={
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"borderTopLeftRadius": 4,
|
|
58
|
-
"borderTopRightRadius": 4,
|
|
59
|
-
"borderTopWidth": 1,
|
|
60
|
-
"paddingBottom": 4,
|
|
61
|
-
"paddingLeft": 8,
|
|
62
|
-
"paddingRight": 8,
|
|
63
|
-
"paddingTop": 4,
|
|
64
|
-
}
|
|
41
|
+
Array [
|
|
42
|
+
Object {
|
|
43
|
+
"backgroundColor": "#ecf0ff",
|
|
44
|
+
"borderColor": "#4568fb",
|
|
45
|
+
"borderRadius": 4,
|
|
46
|
+
"borderWidth": 1,
|
|
47
|
+
"paddingHorizontal": 8,
|
|
48
|
+
"paddingVertical": 2,
|
|
49
|
+
},
|
|
50
|
+
undefined,
|
|
51
|
+
]
|
|
65
52
|
}
|
|
66
53
|
themeIntent="info"
|
|
67
54
|
>
|
|
68
55
|
<Text
|
|
69
56
|
style={
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
57
|
+
Array [
|
|
58
|
+
Object {
|
|
59
|
+
"color": "#4568fb",
|
|
60
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
61
|
+
"fontSize": 12,
|
|
62
|
+
},
|
|
63
|
+
undefined,
|
|
64
|
+
]
|
|
75
65
|
}
|
|
76
66
|
themeIntent="info"
|
|
77
67
|
>
|
|
@@ -83,35 +73,30 @@ exports[`Badge has info style when intent is info 1`] = `
|
|
|
83
73
|
exports[`Badge has success style when intent is success 1`] = `
|
|
84
74
|
<View
|
|
85
75
|
style={
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"borderTopLeftRadius": 4,
|
|
98
|
-
"borderTopRightRadius": 4,
|
|
99
|
-
"borderTopWidth": 1,
|
|
100
|
-
"paddingBottom": 4,
|
|
101
|
-
"paddingLeft": 8,
|
|
102
|
-
"paddingRight": 8,
|
|
103
|
-
"paddingTop": 4,
|
|
104
|
-
}
|
|
76
|
+
Array [
|
|
77
|
+
Object {
|
|
78
|
+
"backgroundColor": "#f0fef4",
|
|
79
|
+
"borderColor": "#017d6d",
|
|
80
|
+
"borderRadius": 4,
|
|
81
|
+
"borderWidth": 1,
|
|
82
|
+
"paddingHorizontal": 8,
|
|
83
|
+
"paddingVertical": 2,
|
|
84
|
+
},
|
|
85
|
+
undefined,
|
|
86
|
+
]
|
|
105
87
|
}
|
|
106
88
|
themeIntent="success"
|
|
107
89
|
>
|
|
108
90
|
<Text
|
|
109
91
|
style={
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
92
|
+
Array [
|
|
93
|
+
Object {
|
|
94
|
+
"color": "#017d6d",
|
|
95
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
96
|
+
"fontSize": 12,
|
|
97
|
+
},
|
|
98
|
+
undefined,
|
|
99
|
+
]
|
|
115
100
|
}
|
|
116
101
|
themeIntent="success"
|
|
117
102
|
>
|
|
@@ -123,35 +108,30 @@ exports[`Badge has success style when intent is success 1`] = `
|
|
|
123
108
|
exports[`Badge has warning style when intent is warning 1`] = `
|
|
124
109
|
<View
|
|
125
110
|
style={
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
"borderTopLeftRadius": 4,
|
|
138
|
-
"borderTopRightRadius": 4,
|
|
139
|
-
"borderTopWidth": 1,
|
|
140
|
-
"paddingBottom": 4,
|
|
141
|
-
"paddingLeft": 8,
|
|
142
|
-
"paddingRight": 8,
|
|
143
|
-
"paddingTop": 4,
|
|
144
|
-
}
|
|
111
|
+
Array [
|
|
112
|
+
Object {
|
|
113
|
+
"backgroundColor": "#fff6eb",
|
|
114
|
+
"borderColor": "#d98a2c",
|
|
115
|
+
"borderRadius": 4,
|
|
116
|
+
"borderWidth": 1,
|
|
117
|
+
"paddingHorizontal": 8,
|
|
118
|
+
"paddingVertical": 2,
|
|
119
|
+
},
|
|
120
|
+
undefined,
|
|
121
|
+
]
|
|
145
122
|
}
|
|
146
123
|
themeIntent="warning"
|
|
147
124
|
>
|
|
148
125
|
<Text
|
|
149
126
|
style={
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
127
|
+
Array [
|
|
128
|
+
Object {
|
|
129
|
+
"color": "#d98a2c",
|
|
130
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
131
|
+
"fontSize": 12,
|
|
132
|
+
},
|
|
133
|
+
undefined,
|
|
134
|
+
]
|
|
155
135
|
}
|
|
156
136
|
themeIntent="warning"
|
|
157
137
|
>
|
|
@@ -1,52 +1,53 @@
|
|
|
1
1
|
import { View } from 'react-native';
|
|
2
|
-
import styled from '
|
|
2
|
+
import styled from '@emotion/native';
|
|
3
|
+
import Typography from '../Typography';
|
|
3
4
|
|
|
4
|
-
const BottomNavigationTab = styled(View)<{ themeVisibility?: boolean }
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
themeVisibility === false ? 'none' : 'flex'
|
|
8
|
-
|
|
5
|
+
const BottomNavigationTab = styled(View)<{ themeVisibility?: boolean }>(
|
|
6
|
+
({ themeVisibility }) => ({
|
|
7
|
+
flex: 1,
|
|
8
|
+
display: themeVisibility === false ? 'none' : 'flex',
|
|
9
|
+
})
|
|
10
|
+
);
|
|
9
11
|
|
|
10
|
-
const BottomNavigationContainer = styled(View)
|
|
11
|
-
flex: 1
|
|
12
|
-
overflow: hidden
|
|
13
|
-
|
|
12
|
+
const BottomNavigationContainer = styled(View)({
|
|
13
|
+
flex: 1,
|
|
14
|
+
overflow: 'hidden',
|
|
15
|
+
});
|
|
14
16
|
|
|
15
|
-
const ContentWrapper = styled(View)
|
|
16
|
-
flex: 1
|
|
17
|
-
|
|
17
|
+
const ContentWrapper = styled(View)({
|
|
18
|
+
flex: 1,
|
|
19
|
+
});
|
|
18
20
|
|
|
19
21
|
const BottomBarWrapper = styled(View)<{
|
|
20
22
|
themeInsets: { top: number; right: number; bottom: number; left: number };
|
|
21
|
-
}
|
|
22
|
-
height:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
`;
|
|
23
|
+
}>(({ themeInsets, theme }) => ({
|
|
24
|
+
height: theme.__hd__.bottomNavigation.sizes.height + themeInsets.bottom,
|
|
25
|
+
paddingBottom: themeInsets.bottom,
|
|
26
|
+
paddingLeft: Math.max(themeInsets.left, themeInsets.right),
|
|
27
|
+
paddingRight: Math.max(themeInsets.left, themeInsets.right),
|
|
28
|
+
backgroundColor: theme.__hd__.bottomNavigation.colors.background,
|
|
29
|
+
shadowColor: theme.__hd__.bottomNavigation.colors.shadow,
|
|
30
|
+
shadowOffset: theme.__hd__.bottomNavigation.shadows.offset,
|
|
31
|
+
shadowOpacity: theme.__hd__.bottomNavigation.shadows.opacity,
|
|
32
|
+
shadowRadius: theme.__hd__.bottomNavigation.shadows.radius,
|
|
33
|
+
elevation: theme.__hd__.bottomNavigation.shadows.elevation,
|
|
34
|
+
}));
|
|
35
|
+
|
|
36
|
+
const BottomBar = styled(View)({
|
|
37
|
+
flex: 1,
|
|
38
|
+
flexDirection: 'row',
|
|
39
|
+
overflow: 'hidden',
|
|
40
|
+
alignItems: 'center',
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
const BottomBarItem = styled(View)({
|
|
44
|
+
flex: 1,
|
|
45
|
+
alignItems: 'center',
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const StyledBottomBarText = styled(Typography.Text)(({ theme }) => ({
|
|
49
|
+
marginTop: theme.__hd__.bottomNavigation.space.titleMarginTop,
|
|
50
|
+
}));
|
|
50
51
|
|
|
51
52
|
export {
|
|
52
53
|
BottomBar,
|
|
@@ -55,4 +56,5 @@ export {
|
|
|
55
56
|
BottomNavigationContainer,
|
|
56
57
|
BottomBarWrapper,
|
|
57
58
|
ContentWrapper,
|
|
59
|
+
StyledBottomBarText,
|
|
58
60
|
};
|