@applicaster/zapp-react-native-ui-components 16.0.0-alpha.1535029240 → 16.0.0-alpha.1701179921
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/Components/AudioPlayer/tv/__tests__/audioPlayer.test.js +19 -0
- package/Components/AudioPlayer/tv/__tests__/index.test.tsx +120 -0
- package/Components/AudioPlayer/tv/index.tsx +5 -1
- package/Components/Cell/Cell.tsx +3 -6
- package/Components/Cell/TvOSCellComponent.tsx +0 -1
- package/Components/GeneralContentScreen/GeneralContentScreenHookAdapter.tsx +15 -0
- package/Components/GeneralContentScreen/hookAdapter/__tests__/skipExpression.test.ts +294 -0
- package/Components/GeneralContentScreen/hookAdapter/__tests__/validationHelper.test.ts +64 -0
- package/Components/GeneralContentScreen/hookAdapter/skipExpression.ts +252 -0
- package/Components/GeneralContentScreen/hookAdapter/validationHelper.ts +18 -0
- package/Components/LinkHandler/LinkHandler.tsx +2 -7
- package/Components/MasterCell/DefaultComponents/ActionButton.tsx +5 -1
- package/Components/MasterCell/DefaultComponents/ActionButtonsCore/components/ActionButtonController.tsx +19 -4
- package/Components/MasterCell/DefaultComponents/ActionButtonsCore/components/__tests__/ActionButtonController.test.tsx +43 -1
- package/Components/MasterCell/DefaultComponents/Button.tsx +1 -0
- package/Components/MasterCell/DefaultComponents/Image/hoc/utils/__tests__/withDimensions.test.ts +420 -125
- package/Components/MasterCell/DefaultComponents/Image/hoc/utils/index.ts +114 -19
- package/Components/MasterCell/DefaultComponents/Image/hoc/withDimensions.tsx +19 -8
- package/Components/MasterCell/DefaultComponents/LiveImage/executePreloadHooks.ts +2 -4
- package/Components/MasterCell/DefaultComponents/LiveImage/index.tsx +2 -3
- package/Components/MasterCell/DefaultComponents/Toggle.tsx +36 -14
- package/Components/MasterCell/DefaultComponents/__tests__/Toggle.test.tsx +167 -0
- package/Components/MasterCell/SharedUI/CollapsibleTextContainer/__tests__/factory.test.ts +32 -0
- package/Components/MasterCell/SharedUI/CollapsibleTextContainer/index.ts +1 -2
- package/Components/ModalComponent/ActionsBottomSheet/ActionButton.tsx +56 -0
- package/Components/ModalComponent/ActionsBottomSheet/__tests__/openActionsBottomSheet.test.ts +38 -0
- package/Components/ModalComponent/ActionsBottomSheet/boundActionButton.tsx +24 -0
- package/Components/ModalComponent/ActionsBottomSheet/index.ts +9 -0
- package/Components/ModalComponent/ActionsBottomSheet/openActionsBottomSheet.ts +61 -0
- package/Components/ModalComponent/AudioPlayer/Components/Button.tsx +87 -97
- package/Components/ModalComponent/AudioPlayer/Components/Header.tsx +87 -126
- package/Components/ModalComponent/AudioPlayer/Components/Input.tsx +140 -83
- package/Components/ModalComponent/AudioPlayer/Components/Item.tsx +252 -123
- package/Components/ModalComponent/AudioPlayer/Components/NowPlayingHeaderSection.tsx +205 -0
- package/Components/ModalComponent/AudioPlayer/Components/__tests__/Item.test.tsx +113 -0
- package/Components/ModalComponent/AudioPlayer/Components/__tests__/NowPlayingHeaderSection.test.tsx +36 -0
- package/Components/ModalComponent/AudioPlayer/Components/index.ts +3 -3
- package/Components/ModalComponent/AudioPlayer/utils/__tests__/mergeStyles.test.ts +356 -0
- package/Components/ModalComponent/AudioPlayer/utils/mergeStyles.ts +521 -0
- package/Components/ModalComponent/BottomSheetDragArea.tsx +33 -0
- package/Components/ModalComponent/BottomSheetModalContent.tsx +505 -66
- package/Components/ModalComponent/Button/index.tsx +5 -3
- package/Components/ModalComponent/Header/CloseButton.tsx +12 -0
- package/Components/ModalComponent/Header/__tests__/CloseButton.test.tsx +72 -0
- package/Components/ModalComponent/Header/index.tsx +20 -7
- package/Components/ModalComponent/Header/utils.ts +1 -1
- package/Components/ModalComponent/ModalBlocksStyleContext.tsx +10 -0
- package/Components/ModalComponent/SortableList.tsx +156 -0
- package/Components/ModalComponent/SortableList.web.tsx +34 -0
- package/Components/ModalComponent/TextInputContent.tsx +135 -0
- package/Components/ModalComponent/__tests__/BottomSheetDragArea.test.tsx +74 -0
- package/Components/ModalComponent/__tests__/BottomSheetModalContent.test.tsx +343 -0
- package/Components/ModalComponent/__tests__/SortableList.web.test.tsx +16 -0
- package/Components/ModalComponent/__tests__/TextInputContent.test.tsx +169 -0
- package/Components/ModalComponent/__tests__/showTextInput.test.ts +95 -0
- package/Components/ModalComponent/index.tsx +18 -9
- package/Components/ModalComponent/presets/__tests__/getCell.test.ts +90 -0
- package/Components/ModalComponent/presets/dynamicCollectionCell.tsx +78 -0
- package/Components/ModalComponent/presets/index.ts +27 -0
- package/Components/ModalComponent/presets/selectableCell.tsx +28 -0
- package/Components/ModalComponent/presets/standardCell.tsx +41 -0
- package/Components/ModalComponent/presets/types.ts +35 -0
- package/Components/ModalComponent/showTextInput.ts +52 -0
- package/Components/ModalComponent/utils.ts +82 -21
- package/Components/OfflineHandler/hooks.ts +0 -12
- package/Components/PlayerContainer/PlayerContainer.tsx +19 -8
- package/Components/PlayerContainer/ProgramInfo/index.tsx +3 -4
- package/Components/PlayerContainer/__tests__/PlayerContainer.test.tsx +66 -13
- package/Components/River/ComponentsMap/ComponentsMap.tsx +85 -59
- package/Components/River/River.tsx +4 -0
- package/Components/River/__tests__/__snapshots__/componentsMap.test.js.snap +138 -75
- package/Components/River/__tests__/componentsMap.test.js +8 -3
- package/Components/River/__tests__/resultCallback.test.tsx +47 -0
- package/Components/Screen/__tests__/Screen.test.tsx +24 -0
- package/Components/Screen/__tests__/__snapshots__/Screen.test.tsx.snap +2 -0
- package/Components/Screen/index.tsx +5 -0
- package/Components/Screen/navigationHandler.ts +8 -8
- package/Components/ScreenRevealManager/ScreenRevealManager.ts +18 -2
- package/Components/ScreenRevealManager/__tests__/ScreenRevealManager.test.ts +36 -0
- package/Components/ScreenRevealManager/__tests__/withScreenRevealManager.test.tsx +56 -0
- package/Components/ScreenRevealManager/withScreenRevealManager.tsx +21 -4
- package/Components/Transitioner/Transitioner.tsx +2 -3
- package/Components/Transitioner/__tests__/transitioner.test.js +83 -2
- package/Components/VideoLive/LiveImageManager.ts +9 -3
- package/Components/VideoLive/__tests__/LiveImageManager.test.ts +59 -0
- package/Contexts/ModalNavigationContext/__tests__/index.test.tsx +15 -0
- package/Contexts/ModalNavigationContext/index.tsx +2 -2
- package/Hooks/useEntryActionsExpander.ts +63 -0
- package/assets/empty-Info.png +0 -0
- package/package.json +6 -5
- package/Components/ModalComponent/AudioPlayer/Components/Action.tsx +0 -332
- /package/Decorators/ZappPipesDataConnector/__tests__/{Hero.js → Hero.tsx} +0 -0
|
@@ -1,332 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Modal Building Block — Action
|
|
3
|
-
*
|
|
4
|
-
* Single-file Expo Snack demo for the Action list item building block spec.
|
|
5
|
-
* Three forms (text only / leading icon + text / leading + text + trailing)
|
|
6
|
-
* are driven by data — no separate variants.
|
|
7
|
-
*
|
|
8
|
-
* Green (configurable): background, title, trailingIcon.chevronAsset
|
|
9
|
-
* White (hardcoded): container padding/gutter, icon size, leading icon assets,
|
|
10
|
-
* leading/trailing visibility logic from data
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import React from "react";
|
|
14
|
-
import {
|
|
15
|
-
Image,
|
|
16
|
-
Platform,
|
|
17
|
-
Pressable,
|
|
18
|
-
StyleSheet,
|
|
19
|
-
Text,
|
|
20
|
-
View,
|
|
21
|
-
} from "react-native";
|
|
22
|
-
|
|
23
|
-
const styles = StyleSheet.create({
|
|
24
|
-
row: {
|
|
25
|
-
flexDirection: "row",
|
|
26
|
-
alignItems: "center",
|
|
27
|
-
},
|
|
28
|
-
demoScreen: {
|
|
29
|
-
flex: 1,
|
|
30
|
-
backgroundColor: "#1C1C1E",
|
|
31
|
-
paddingTop: 64,
|
|
32
|
-
paddingHorizontal: 16,
|
|
33
|
-
gap: 12,
|
|
34
|
-
},
|
|
35
|
-
demoHeading: {
|
|
36
|
-
color: "#FFFFFF",
|
|
37
|
-
fontSize: 20,
|
|
38
|
-
fontWeight: "600",
|
|
39
|
-
marginBottom: 8,
|
|
40
|
-
},
|
|
41
|
-
demoLabel: {
|
|
42
|
-
color: "#999999",
|
|
43
|
-
fontSize: 13,
|
|
44
|
-
marginTop: 8,
|
|
45
|
-
},
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
// ---------------------------------------------------------------------------
|
|
49
|
-
// Configuration (green / editable fields from spec)
|
|
50
|
-
// ---------------------------------------------------------------------------
|
|
51
|
-
|
|
52
|
-
export type TextTransform =
|
|
53
|
-
| "default"
|
|
54
|
-
| "lowercase"
|
|
55
|
-
| "uppercase"
|
|
56
|
-
| "capitalize";
|
|
57
|
-
|
|
58
|
-
export type BackgroundConfiguration = {
|
|
59
|
-
defaultColor: string;
|
|
60
|
-
focusedColor: string;
|
|
61
|
-
cornerRadius: number;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export type TitleConfiguration = {
|
|
65
|
-
fontColor: string;
|
|
66
|
-
focusedFontColor: string;
|
|
67
|
-
iosFontFamily: string;
|
|
68
|
-
androidFontFamily: string;
|
|
69
|
-
fontSize: number;
|
|
70
|
-
lineHeight: number;
|
|
71
|
-
iosLetterSpacing: number;
|
|
72
|
-
androidLetterSpacing: number;
|
|
73
|
-
textTransform: TextTransform;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export type TrailingIconConfiguration = {
|
|
77
|
-
chevronAsset?: string;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export type ActionConfiguration = {
|
|
81
|
-
background: BackgroundConfiguration;
|
|
82
|
-
title: TitleConfiguration;
|
|
83
|
-
trailingIcon: TrailingIconConfiguration;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export const DEFAULT_BACKGROUND_CONFIGURATION: BackgroundConfiguration = {
|
|
87
|
-
defaultColor: "transparent",
|
|
88
|
-
focusedColor: "rgba(62, 62, 62, 1)",
|
|
89
|
-
cornerRadius: 12,
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
export const DEFAULT_TITLE_CONFIGURATION: TitleConfiguration = {
|
|
93
|
-
fontColor: "#FFFFFF",
|
|
94
|
-
focusedFontColor: "#FFFFFF",
|
|
95
|
-
iosFontFamily: "SFProText-Semibold",
|
|
96
|
-
androidFontFamily: "Roboto-Medium",
|
|
97
|
-
fontSize: 15,
|
|
98
|
-
lineHeight: 24,
|
|
99
|
-
iosLetterSpacing: -0.2,
|
|
100
|
-
androidLetterSpacing: 0,
|
|
101
|
-
textTransform: "default",
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
export const DEFAULT_TRAILING_ICON_CONFIGURATION: TrailingIconConfiguration =
|
|
105
|
-
{};
|
|
106
|
-
|
|
107
|
-
export const DEFAULT_ACTION_CONFIGURATION: ActionConfiguration = {
|
|
108
|
-
background: DEFAULT_BACKGROUND_CONFIGURATION,
|
|
109
|
-
title: DEFAULT_TITLE_CONFIGURATION,
|
|
110
|
-
trailingIcon: DEFAULT_TRAILING_ICON_CONFIGURATION,
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
// ---------------------------------------------------------------------------
|
|
114
|
-
// Data (runtime — controls which elements are shown)
|
|
115
|
-
// ---------------------------------------------------------------------------
|
|
116
|
-
|
|
117
|
-
export type LeadingActionType =
|
|
118
|
-
| "addToQueue"
|
|
119
|
-
| "addToPlaylist"
|
|
120
|
-
| "favorite"
|
|
121
|
-
| "share"
|
|
122
|
-
| "sleepTimer"
|
|
123
|
-
| "playbackSpeed";
|
|
124
|
-
|
|
125
|
-
export type ActionData = {
|
|
126
|
-
title: string;
|
|
127
|
-
/** When set, leading icon is shown (Enable: On). */
|
|
128
|
-
leadingActionType?: LeadingActionType;
|
|
129
|
-
/** When true, trailing chevron is shown (Enable: On). */
|
|
130
|
-
showTrailingChevron?: boolean;
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
export type AudioPlayerActionProps = {
|
|
134
|
-
configuration: ActionConfiguration;
|
|
135
|
-
data: ActionData;
|
|
136
|
-
focused?: boolean;
|
|
137
|
-
onPress?: () => void;
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
// ---------------------------------------------------------------------------
|
|
141
|
-
// Hardcoded spec values (white fields)
|
|
142
|
-
// ---------------------------------------------------------------------------
|
|
143
|
-
|
|
144
|
-
const CONTAINER_SPEC = {
|
|
145
|
-
paddingTop: 13,
|
|
146
|
-
paddingRight: 10,
|
|
147
|
-
paddingBottom: 13,
|
|
148
|
-
paddingLeft: 10,
|
|
149
|
-
horizontalGutter: 12,
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
const ICON_SPEC = {
|
|
153
|
-
width: 24,
|
|
154
|
-
height: 24,
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
const DEFAULT_CHEVRON_ASSET =
|
|
158
|
-
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAALElEQVR42mNgGAXUBlu2bPmPjIeWBeiGDy0Lhrbrh1/qGXqZaxSMglEw0gEA4c+IpUrpYX4AAAAASUVORK5CYII=";
|
|
159
|
-
|
|
160
|
-
/** Hardcoded: action type → leading icon asset (base64 PNG). */
|
|
161
|
-
const LEADING_ICON_ASSETS: Record<LeadingActionType, string> = {
|
|
162
|
-
addToQueue:
|
|
163
|
-
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAALElEQVR42mNgGAUjE/xHAzS3gFgweC0Y+nEwGslkBRFFwTj8LBjNyaNgmAMAJTf+EEEZcS0AAAAASUVORK5CYII=",
|
|
164
|
-
addToPlaylist:
|
|
165
|
-
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAKUlEQVR42mNgGAVDBvxHA6MWjFpAvEGkglELKLdgNJmOWkA7C0YBzQAAivu+UKRR1ZIAAAAASUVORK5CYII=",
|
|
166
|
-
favorite:
|
|
167
|
-
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAKklEQVR42mNgGAWjYBTgBP+xAGLkRi0YQhbgM4wqBo9aMHgsGAWjgCAAALyAZqh4yyZZAAAAAElFTkSuQmCC",
|
|
168
|
-
share:
|
|
169
|
-
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAK0lEQVR42mNgGAVDDvxHAqMWjFowUiz4TwQYgRYQYxBFlo1aMPAWjAK6AgD2g7pUUT7VeAAAAABJRU5ErkJggg==",
|
|
170
|
-
sleepTimer:
|
|
171
|
-
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAYUlEQVR42tWUSQ4AIAgD+f+n8eJRliIQ6MmEZTSxJZokvipdXgZpAbzOO17AglIXI7XULxmCoEMwRGuWam6AdRsN4IJYTRH4PIDkhxTA92zUPNBcFDDHaOVR0RJ2LXG9QgemFVK8tpo4PwAAAABJRU5ErkJggg==",
|
|
172
|
-
playbackSpeed:
|
|
173
|
-
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAK0lEQVR42mNgGAVDDvxHAqMWjFowUiz4TwQYgRYQYxBFlo1aMPAWjAK6AgD2g7pUUT7VeAAAAABJRU5ErkJggg==",
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
function getTextTransformStyle(
|
|
177
|
-
textTransform: TextTransform
|
|
178
|
-
): "none" | "lowercase" | "uppercase" | "capitalize" {
|
|
179
|
-
return textTransform === "default" ? "none" : textTransform;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function shouldShowLeadingIcon(leadingActionType?: LeadingActionType) {
|
|
183
|
-
return !!leadingActionType;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
function shouldShowTrailingIcon(showTrailingChevron?: boolean) {
|
|
187
|
-
return !!showTrailingChevron;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// ---------------------------------------------------------------------------
|
|
191
|
-
// Inner components
|
|
192
|
-
// ---------------------------------------------------------------------------
|
|
193
|
-
|
|
194
|
-
type ActionContainerProps = {
|
|
195
|
-
configuration: BackgroundConfiguration;
|
|
196
|
-
focused: boolean;
|
|
197
|
-
children: React.ReactNode;
|
|
198
|
-
onPress?: () => void;
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
function ActionContainer({
|
|
202
|
-
configuration,
|
|
203
|
-
focused,
|
|
204
|
-
children,
|
|
205
|
-
onPress,
|
|
206
|
-
}: ActionContainerProps) {
|
|
207
|
-
return (
|
|
208
|
-
<Pressable
|
|
209
|
-
onPress={onPress}
|
|
210
|
-
style={({ pressed }) => ({
|
|
211
|
-
backgroundColor:
|
|
212
|
-
pressed || focused
|
|
213
|
-
? configuration.focusedColor
|
|
214
|
-
: configuration.defaultColor,
|
|
215
|
-
borderRadius: configuration.cornerRadius,
|
|
216
|
-
paddingTop: CONTAINER_SPEC.paddingTop,
|
|
217
|
-
paddingRight: CONTAINER_SPEC.paddingRight,
|
|
218
|
-
paddingBottom: CONTAINER_SPEC.paddingBottom,
|
|
219
|
-
paddingLeft: CONTAINER_SPEC.paddingLeft,
|
|
220
|
-
})}
|
|
221
|
-
>
|
|
222
|
-
{children}
|
|
223
|
-
</Pressable>
|
|
224
|
-
);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
type ActionTitleProps = {
|
|
228
|
-
title: string;
|
|
229
|
-
configuration: TitleConfiguration;
|
|
230
|
-
focused: boolean;
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
function ActionTitle({ title, configuration, focused }: ActionTitleProps) {
|
|
234
|
-
const letterSpacing =
|
|
235
|
-
Platform.OS === "ios"
|
|
236
|
-
? configuration.iosLetterSpacing
|
|
237
|
-
: configuration.androidLetterSpacing;
|
|
238
|
-
|
|
239
|
-
return (
|
|
240
|
-
<Text
|
|
241
|
-
style={{
|
|
242
|
-
flex: 1,
|
|
243
|
-
color: focused
|
|
244
|
-
? configuration.focusedFontColor
|
|
245
|
-
: configuration.fontColor,
|
|
246
|
-
fontSize: configuration.fontSize,
|
|
247
|
-
lineHeight: configuration.lineHeight,
|
|
248
|
-
letterSpacing,
|
|
249
|
-
fontFamily: Platform.select({
|
|
250
|
-
ios: configuration.iosFontFamily,
|
|
251
|
-
android: configuration.androidFontFamily,
|
|
252
|
-
default: configuration.androidFontFamily,
|
|
253
|
-
}),
|
|
254
|
-
textTransform: getTextTransformStyle(configuration.textTransform),
|
|
255
|
-
}}
|
|
256
|
-
numberOfLines={1}
|
|
257
|
-
>
|
|
258
|
-
{title}
|
|
259
|
-
</Text>
|
|
260
|
-
);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
type ActionLeadingIconProps = {
|
|
264
|
-
actionType: LeadingActionType;
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
function ActionLeadingIcon({ actionType }: ActionLeadingIconProps) {
|
|
268
|
-
return (
|
|
269
|
-
<Image
|
|
270
|
-
source={{ uri: LEADING_ICON_ASSETS[actionType] }}
|
|
271
|
-
style={{ width: ICON_SPEC.width, height: ICON_SPEC.height }}
|
|
272
|
-
resizeMode="contain"
|
|
273
|
-
/>
|
|
274
|
-
);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
type ActionTrailingIconProps = {
|
|
278
|
-
configuration: TrailingIconConfiguration;
|
|
279
|
-
};
|
|
280
|
-
|
|
281
|
-
function ActionTrailingIcon({ configuration }: ActionTrailingIconProps) {
|
|
282
|
-
const asset = configuration.chevronAsset ?? DEFAULT_CHEVRON_ASSET;
|
|
283
|
-
|
|
284
|
-
return (
|
|
285
|
-
<Image
|
|
286
|
-
source={{ uri: asset }}
|
|
287
|
-
style={{ width: ICON_SPEC.width, height: ICON_SPEC.height }}
|
|
288
|
-
resizeMode="contain"
|
|
289
|
-
/>
|
|
290
|
-
);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
// ---------------------------------------------------------------------------
|
|
294
|
-
// AudioPlayerAction
|
|
295
|
-
// ---------------------------------------------------------------------------
|
|
296
|
-
|
|
297
|
-
export function AudioPlayerAction({
|
|
298
|
-
configuration,
|
|
299
|
-
data,
|
|
300
|
-
focused = false,
|
|
301
|
-
onPress,
|
|
302
|
-
}: AudioPlayerActionProps) {
|
|
303
|
-
const { background, title, trailingIcon } = configuration;
|
|
304
|
-
const { title: label, leadingActionType, showTrailingChevron } = data;
|
|
305
|
-
|
|
306
|
-
const showLeading = shouldShowLeadingIcon(leadingActionType);
|
|
307
|
-
const showTrailing = shouldShowTrailingIcon(showTrailingChevron);
|
|
308
|
-
|
|
309
|
-
return (
|
|
310
|
-
<ActionContainer
|
|
311
|
-
configuration={background}
|
|
312
|
-
focused={focused}
|
|
313
|
-
onPress={onPress}
|
|
314
|
-
>
|
|
315
|
-
<View style={styles.row}>
|
|
316
|
-
{showLeading ? (
|
|
317
|
-
<>
|
|
318
|
-
<ActionLeadingIcon actionType={leadingActionType} />
|
|
319
|
-
<View style={{ width: CONTAINER_SPEC.horizontalGutter }} />
|
|
320
|
-
</>
|
|
321
|
-
) : null}
|
|
322
|
-
<ActionTitle title={label} configuration={title} focused={focused} />
|
|
323
|
-
{showTrailing ? (
|
|
324
|
-
<>
|
|
325
|
-
<View style={{ width: CONTAINER_SPEC.horizontalGutter }} />
|
|
326
|
-
<ActionTrailingIcon configuration={trailingIcon} />
|
|
327
|
-
</>
|
|
328
|
-
) : null}
|
|
329
|
-
</View>
|
|
330
|
-
</ActionContainer>
|
|
331
|
-
);
|
|
332
|
-
}
|
|
File without changes
|