@applicaster/zapp-react-native-ui-components 15.1.14 → 15.1.15-rc.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/Components/GeneralContentScreen/GeneralContentScreenHookAdapter.tsx +15 -0
- package/Components/MasterCell/DefaultComponents/ActionButton.tsx +4 -1
- 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 +58 -97
- package/Components/ModalComponent/AudioPlayer/Components/Header.tsx +142 -142
- package/Components/ModalComponent/AudioPlayer/Components/Input.tsx +628 -0
- package/Components/ModalComponent/AudioPlayer/Components/Item.tsx +448 -175
- package/Components/ModalComponent/AudioPlayer/Components/NowPlayingHeaderSection.tsx +94 -0
- package/Components/ModalComponent/AudioPlayer/Components/__tests__/Item.test.tsx +113 -0
- package/Components/ModalComponent/AudioPlayer/Components/index.ts +6 -4
- package/Components/ModalComponent/AudioPlayer/utils/__tests__/mergeStyles.test.ts +248 -0
- package/Components/ModalComponent/AudioPlayer/utils/mergeStyles.ts +386 -0
- package/Components/ModalComponent/BottomSheetModalContent.tsx +425 -66
- package/Components/ModalComponent/Button/index.tsx +5 -3
- 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 +157 -0
- package/Components/ModalComponent/SortableList.web.tsx +102 -0
- package/Components/ModalComponent/TextInputContent.tsx +112 -0
- package/Components/ModalComponent/__tests__/BottomSheetModalContent.test.tsx +255 -0
- package/Components/ModalComponent/__tests__/TextInputContent.test.tsx +156 -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 +43 -0
- package/Components/ModalComponent/utils.ts +82 -21
- package/Components/River/ComponentsMap/ComponentsMap.tsx +87 -60
- package/Components/River/__tests__/__snapshots__/componentsMap.test.js.snap +139 -75
- package/Components/River/__tests__/componentsMap.test.js +8 -3
- package/Components/Screen/navigationHandler.ts +8 -8
- package/Contexts/ModalNavigationContext/__tests__/index.test.tsx +15 -0
- package/Contexts/ModalNavigationContext/index.tsx +2 -2
- package/Hooks/useEntryActionsExpander.ts +63 -0
- package/package.json +6 -5
- package/Components/ModalComponent/AudioPlayer/Components/Action.tsx +0 -368
- /package/Decorators/ZappPipesDataConnector/__tests__/{Hero.js → Hero.tsx} +0 -0
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BackgroundConfiguration as ItemBackgroundConfiguration,
|
|
3
|
+
ImageConfiguration as ItemImageConfiguration,
|
|
4
|
+
LabelConfiguration as ItemLabelConfiguration,
|
|
5
|
+
NowPlayingAssetConfiguration as ItemNowPlayingAssetConfiguration,
|
|
6
|
+
CheckboxAssetsConfiguration as ItemCheckboxAssetsConfiguration,
|
|
7
|
+
ActionButtonAssetsConfiguration as ItemActionButtonAssetsConfiguration,
|
|
8
|
+
ItemConfiguration,
|
|
9
|
+
} from "../Components/Item";
|
|
10
|
+
import {
|
|
11
|
+
TitleConfiguration as HeaderTitleConfiguration,
|
|
12
|
+
HeaderConfiguration,
|
|
13
|
+
} from "../Components/Header";
|
|
14
|
+
import {
|
|
15
|
+
BackgroundConfiguration as ButtonBackgroundConfiguration,
|
|
16
|
+
TitleConfiguration as ButtonTitleConfiguration,
|
|
17
|
+
ButtonConfiguration,
|
|
18
|
+
} from "../Components/Button";
|
|
19
|
+
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
// Item Merging Helpers
|
|
22
|
+
// ---------------------------------------------------------------------------
|
|
23
|
+
|
|
24
|
+
function mergeItemBackground(
|
|
25
|
+
base: ItemBackgroundConfiguration,
|
|
26
|
+
defaultOverride?: Record<string, any>,
|
|
27
|
+
focusedOverride?: Record<string, any>
|
|
28
|
+
): ItemBackgroundConfiguration {
|
|
29
|
+
if (!defaultOverride && !focusedOverride) return base;
|
|
30
|
+
|
|
31
|
+
// Only take focused color from the focused/pressed bucket (or legacy
|
|
32
|
+
// mis-parsed focus* aliases). Never fall back to default background —
|
|
33
|
+
// that would overwrite base.focusedColor whenever Studio only sets default.
|
|
34
|
+
const focusedColor =
|
|
35
|
+
focusedOverride?.backgroundColor ??
|
|
36
|
+
defaultOverride?.focusColor ??
|
|
37
|
+
defaultOverride?.focusBackgroundColor;
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
...base,
|
|
41
|
+
...(defaultOverride?.backgroundColor
|
|
42
|
+
? { defaultColor: defaultOverride.backgroundColor }
|
|
43
|
+
: {}),
|
|
44
|
+
...(focusedColor != null && focusedColor !== "" ? { focusedColor } : {}),
|
|
45
|
+
...(defaultOverride?.borderRadius !== undefined
|
|
46
|
+
? { cornerRadius: defaultOverride.borderRadius }
|
|
47
|
+
: {}),
|
|
48
|
+
...(defaultOverride?.paddingTop !== undefined
|
|
49
|
+
? { paddingTop: defaultOverride.paddingTop }
|
|
50
|
+
: {}),
|
|
51
|
+
...(defaultOverride?.paddingRight !== undefined
|
|
52
|
+
? { paddingRight: defaultOverride.paddingRight }
|
|
53
|
+
: {}),
|
|
54
|
+
...(defaultOverride?.paddingBottom !== undefined
|
|
55
|
+
? { paddingBottom: defaultOverride.paddingBottom }
|
|
56
|
+
: {}),
|
|
57
|
+
...(defaultOverride?.paddingLeft !== undefined
|
|
58
|
+
? { paddingLeft: defaultOverride.paddingLeft }
|
|
59
|
+
: {}),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function mergeItemImage(
|
|
64
|
+
base: ItemImageConfiguration,
|
|
65
|
+
override?: Record<string, any>
|
|
66
|
+
): ItemImageConfiguration {
|
|
67
|
+
if (!override) return base;
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
...base,
|
|
71
|
+
...(override.width !== undefined ? { width: override.width } : {}),
|
|
72
|
+
...(override.height !== undefined ? { height: override.height } : {}),
|
|
73
|
+
...(override.borderRadius !== undefined
|
|
74
|
+
? { cornerRadius: override.borderRadius }
|
|
75
|
+
: {}),
|
|
76
|
+
...(override.borderWidth !== undefined
|
|
77
|
+
? { borderWidth: override.borderWidth }
|
|
78
|
+
: {}),
|
|
79
|
+
...(override.borderColor ? { borderColor: override.borderColor } : {}),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function mergeItemLabel(
|
|
84
|
+
base: ItemLabelConfiguration,
|
|
85
|
+
override?: Record<string, any>
|
|
86
|
+
): ItemLabelConfiguration {
|
|
87
|
+
if (!override) return base;
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
...base,
|
|
91
|
+
...(override.fontColor ? { fontColor: override.fontColor } : {}),
|
|
92
|
+
...(override.fontSize !== undefined ? { fontSize: override.fontSize } : {}),
|
|
93
|
+
...(override.lineHeight !== undefined
|
|
94
|
+
? { lineHeight: override.lineHeight }
|
|
95
|
+
: {}),
|
|
96
|
+
...(override.fontFamily
|
|
97
|
+
? {
|
|
98
|
+
iosFontFamily: override.fontFamily,
|
|
99
|
+
androidFontFamily: override.fontFamily,
|
|
100
|
+
}
|
|
101
|
+
: {}),
|
|
102
|
+
...(override.iosFontFamily
|
|
103
|
+
? { iosFontFamily: override.iosFontFamily }
|
|
104
|
+
: {}),
|
|
105
|
+
...(override.androidFontFamily
|
|
106
|
+
? { androidFontFamily: override.androidFontFamily }
|
|
107
|
+
: {}),
|
|
108
|
+
...(override.letterSpacing !== undefined
|
|
109
|
+
? {
|
|
110
|
+
iosLetterSpacing: override.letterSpacing,
|
|
111
|
+
androidLetterSpacing: override.letterSpacing,
|
|
112
|
+
}
|
|
113
|
+
: {}),
|
|
114
|
+
...(override.iosLetterSpacing !== undefined
|
|
115
|
+
? { iosLetterSpacing: override.iosLetterSpacing }
|
|
116
|
+
: {}),
|
|
117
|
+
...(override.androidLetterSpacing !== undefined
|
|
118
|
+
? { androidLetterSpacing: override.androidLetterSpacing }
|
|
119
|
+
: {}),
|
|
120
|
+
...(override.textTransform
|
|
121
|
+
? { textTransform: override.textTransform }
|
|
122
|
+
: {}),
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function mergeItemNowPlayingAsset(
|
|
127
|
+
base: ItemNowPlayingAssetConfiguration,
|
|
128
|
+
override?: Record<string, any>
|
|
129
|
+
): ItemNowPlayingAssetConfiguration {
|
|
130
|
+
if (!override) return base;
|
|
131
|
+
|
|
132
|
+
return {
|
|
133
|
+
...base,
|
|
134
|
+
...(override.asset ? { asset: override.asset } : {}),
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function mergeItemCheckboxAssets(
|
|
139
|
+
base: ItemCheckboxAssetsConfiguration,
|
|
140
|
+
override?: Record<string, any>
|
|
141
|
+
): ItemCheckboxAssetsConfiguration {
|
|
142
|
+
if (!override) return base;
|
|
143
|
+
|
|
144
|
+
return {
|
|
145
|
+
...base,
|
|
146
|
+
...(override.asset ? { asset: override.asset } : {}),
|
|
147
|
+
...(override.checkedAsset ? { checkedAsset: override.checkedAsset } : {}),
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function mergeItemActionButtonAssets(
|
|
152
|
+
base: ItemActionButtonAssetsConfiguration,
|
|
153
|
+
override?: Record<string, any>
|
|
154
|
+
): ItemActionButtonAssetsConfiguration {
|
|
155
|
+
if (!override) return base;
|
|
156
|
+
|
|
157
|
+
return {
|
|
158
|
+
...base,
|
|
159
|
+
...(override.removeAsset ? { removeAsset: override.removeAsset } : {}),
|
|
160
|
+
...(override.dragAsset ? { dragAsset: override.dragAsset } : {}),
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export function mergeItemConfiguration(
|
|
165
|
+
base: ItemConfiguration,
|
|
166
|
+
itemBlock?: Record<string, any>
|
|
167
|
+
): ItemConfiguration {
|
|
168
|
+
if (!itemBlock) return base;
|
|
169
|
+
|
|
170
|
+
const bgDefault = itemBlock.background?.default || itemBlock.background;
|
|
171
|
+
|
|
172
|
+
const bgFocused =
|
|
173
|
+
itemBlock.background?.focused ||
|
|
174
|
+
itemBlock.background?.focus ||
|
|
175
|
+
itemBlock.background?.pressed;
|
|
176
|
+
|
|
177
|
+
const img = itemBlock.image?.default || itemBlock.image;
|
|
178
|
+
const label1 = itemBlock.textLabel1?.default || itemBlock.textLabel1;
|
|
179
|
+
const label2 = itemBlock.textLabel2?.default || itemBlock.textLabel2;
|
|
180
|
+
|
|
181
|
+
const npLabel =
|
|
182
|
+
itemBlock.nowPlayingLabel?.default || itemBlock.nowPlayingLabel;
|
|
183
|
+
|
|
184
|
+
const npAsset =
|
|
185
|
+
itemBlock.nowPlayingAsset?.default || itemBlock.nowPlayingAsset;
|
|
186
|
+
|
|
187
|
+
const checkbox = itemBlock.checkbox?.default || itemBlock.checkbox;
|
|
188
|
+
|
|
189
|
+
const actionButtons =
|
|
190
|
+
itemBlock.actionButtons?.default || itemBlock.actionButtons;
|
|
191
|
+
|
|
192
|
+
return {
|
|
193
|
+
...base,
|
|
194
|
+
background: mergeItemBackground(base.background, bgDefault, bgFocused),
|
|
195
|
+
image: mergeItemImage(base.image, img),
|
|
196
|
+
textLabel1: mergeItemLabel(base.textLabel1, label1),
|
|
197
|
+
textLabel2: mergeItemLabel(base.textLabel2, label2),
|
|
198
|
+
nowPlayingLabel: mergeItemLabel(base.nowPlayingLabel, npLabel),
|
|
199
|
+
nowPlayingAsset: mergeItemNowPlayingAsset(base.nowPlayingAsset, npAsset),
|
|
200
|
+
checkboxAssets: mergeItemCheckboxAssets(
|
|
201
|
+
base.checkboxAssets || {},
|
|
202
|
+
checkbox
|
|
203
|
+
),
|
|
204
|
+
actionButtonAssets: mergeItemActionButtonAssets(
|
|
205
|
+
base.actionButtonAssets || {},
|
|
206
|
+
actionButtons
|
|
207
|
+
),
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// ---------------------------------------------------------------------------
|
|
212
|
+
// Header Merging Helpers
|
|
213
|
+
// ---------------------------------------------------------------------------
|
|
214
|
+
|
|
215
|
+
function mergeHeaderTitle(
|
|
216
|
+
base: HeaderTitleConfiguration,
|
|
217
|
+
override?: Record<string, any>
|
|
218
|
+
): HeaderTitleConfiguration {
|
|
219
|
+
if (!override) return base;
|
|
220
|
+
|
|
221
|
+
return {
|
|
222
|
+
...base,
|
|
223
|
+
...(override.fontColor ? { fontColor: override.fontColor } : {}),
|
|
224
|
+
...(override.fontSize !== undefined ? { fontSize: override.fontSize } : {}),
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export function mergeHeaderConfiguration(
|
|
229
|
+
base: HeaderConfiguration,
|
|
230
|
+
headerBlock?: Record<string, any>
|
|
231
|
+
): HeaderConfiguration & { backgroundColor?: string } {
|
|
232
|
+
if (!headerBlock) return base;
|
|
233
|
+
|
|
234
|
+
const bgOverride = headerBlock.container?.default?.backgroundColor;
|
|
235
|
+
|
|
236
|
+
return {
|
|
237
|
+
...base,
|
|
238
|
+
title: mergeHeaderTitle(base.title, headerBlock.title?.default),
|
|
239
|
+
...(bgOverride ? { backgroundColor: bgOverride } : {}),
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// ---------------------------------------------------------------------------
|
|
244
|
+
// Button Merging Helpers
|
|
245
|
+
// ---------------------------------------------------------------------------
|
|
246
|
+
|
|
247
|
+
function mergeButtonBackground(
|
|
248
|
+
base: ButtonBackgroundConfiguration,
|
|
249
|
+
defaultOverride?: Record<string, any>,
|
|
250
|
+
focusedOverride?: Record<string, any>
|
|
251
|
+
): ButtonBackgroundConfiguration {
|
|
252
|
+
if (!defaultOverride && !focusedOverride) return base;
|
|
253
|
+
|
|
254
|
+
// Same as mergeItemBackground: do not use default background as focusedColor.
|
|
255
|
+
const focusedColor =
|
|
256
|
+
focusedOverride?.backgroundColor ??
|
|
257
|
+
defaultOverride?.focusColor ??
|
|
258
|
+
defaultOverride?.focusBackgroundColor;
|
|
259
|
+
|
|
260
|
+
return {
|
|
261
|
+
...base,
|
|
262
|
+
...(defaultOverride?.backgroundColor
|
|
263
|
+
? { defaultColor: defaultOverride.backgroundColor }
|
|
264
|
+
: {}),
|
|
265
|
+
...(focusedColor != null && focusedColor !== "" ? { focusedColor } : {}),
|
|
266
|
+
...(defaultOverride?.borderRadius !== undefined
|
|
267
|
+
? { cornerRadius: defaultOverride.borderRadius }
|
|
268
|
+
: {}),
|
|
269
|
+
...(defaultOverride?.paddingTop !== undefined
|
|
270
|
+
? { paddingTop: defaultOverride.paddingTop }
|
|
271
|
+
: {}),
|
|
272
|
+
...(defaultOverride?.paddingRight !== undefined
|
|
273
|
+
? { paddingRight: defaultOverride.paddingRight }
|
|
274
|
+
: {}),
|
|
275
|
+
...(defaultOverride?.paddingBottom !== undefined
|
|
276
|
+
? { paddingBottom: defaultOverride.paddingBottom }
|
|
277
|
+
: {}),
|
|
278
|
+
...(defaultOverride?.paddingLeft !== undefined
|
|
279
|
+
? { paddingLeft: defaultOverride.paddingLeft }
|
|
280
|
+
: {}),
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function mergeButtonTitle(
|
|
285
|
+
base: ButtonTitleConfiguration,
|
|
286
|
+
override?: Record<string, any>
|
|
287
|
+
): ButtonTitleConfiguration {
|
|
288
|
+
if (!override) return base;
|
|
289
|
+
|
|
290
|
+
return {
|
|
291
|
+
...base,
|
|
292
|
+
...(override.fontColor ? { fontColor: override.fontColor } : {}),
|
|
293
|
+
...(override.fontSize !== undefined ? { fontSize: override.fontSize } : {}),
|
|
294
|
+
...(override.lineHeight !== undefined
|
|
295
|
+
? { lineHeight: override.lineHeight }
|
|
296
|
+
: {}),
|
|
297
|
+
...(override.fontFamily
|
|
298
|
+
? {
|
|
299
|
+
iosFontFamily: override.fontFamily,
|
|
300
|
+
androidFontFamily: override.fontFamily,
|
|
301
|
+
}
|
|
302
|
+
: {}),
|
|
303
|
+
...(override.iosFontFamily
|
|
304
|
+
? { iosFontFamily: override.iosFontFamily }
|
|
305
|
+
: {}),
|
|
306
|
+
...(override.androidFontFamily
|
|
307
|
+
? { androidFontFamily: override.androidFontFamily }
|
|
308
|
+
: {}),
|
|
309
|
+
...(override.letterSpacing !== undefined
|
|
310
|
+
? {
|
|
311
|
+
iosLetterSpacing: override.letterSpacing,
|
|
312
|
+
androidLetterSpacing: override.letterSpacing,
|
|
313
|
+
}
|
|
314
|
+
: {}),
|
|
315
|
+
...(override.iosLetterSpacing !== undefined
|
|
316
|
+
? { iosLetterSpacing: override.iosLetterSpacing }
|
|
317
|
+
: {}),
|
|
318
|
+
...(override.androidLetterSpacing !== undefined
|
|
319
|
+
? { androidLetterSpacing: override.androidLetterSpacing }
|
|
320
|
+
: {}),
|
|
321
|
+
...(override.textTransform
|
|
322
|
+
? { textTransform: override.textTransform }
|
|
323
|
+
: {}),
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
function mergeButtonIcons(
|
|
328
|
+
base: ButtonConfiguration["icons"],
|
|
329
|
+
iconsOverride?: Record<string, any>,
|
|
330
|
+
leadingOverride?: Record<string, any>
|
|
331
|
+
): ButtonConfiguration["icons"] {
|
|
332
|
+
if (!iconsOverride && !leadingOverride) return base;
|
|
333
|
+
|
|
334
|
+
const iconsDefault = iconsOverride?.default || iconsOverride;
|
|
335
|
+
const leadingDefault = leadingOverride?.default || leadingOverride;
|
|
336
|
+
|
|
337
|
+
return {
|
|
338
|
+
...base,
|
|
339
|
+
...(iconsDefault?.width !== undefined ? { width: iconsDefault.width } : {}),
|
|
340
|
+
...(iconsDefault?.height !== undefined
|
|
341
|
+
? { height: iconsDefault.height }
|
|
342
|
+
: {}),
|
|
343
|
+
leadingIcon: {
|
|
344
|
+
...base.leadingIcon,
|
|
345
|
+
...(leadingDefault?.enabled !== undefined
|
|
346
|
+
? { enabled: leadingDefault.enabled }
|
|
347
|
+
: {}),
|
|
348
|
+
...(leadingDefault?.actionType
|
|
349
|
+
? { actionType: leadingDefault.actionType }
|
|
350
|
+
: {}),
|
|
351
|
+
...(leadingDefault?.asset ? { asset: leadingDefault.asset } : {}),
|
|
352
|
+
},
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export function mergeButtonConfiguration(
|
|
357
|
+
base: ButtonConfiguration,
|
|
358
|
+
buttonBlock?: Record<string, any>,
|
|
359
|
+
actionBlock?: Record<string, any>
|
|
360
|
+
): ButtonConfiguration {
|
|
361
|
+
if (!buttonBlock && !actionBlock) return base;
|
|
362
|
+
|
|
363
|
+
const bgDefault =
|
|
364
|
+
buttonBlock?.background?.default || actionBlock?.background?.default;
|
|
365
|
+
|
|
366
|
+
const bgFocused =
|
|
367
|
+
buttonBlock?.background?.focused ||
|
|
368
|
+
buttonBlock?.background?.focus ||
|
|
369
|
+
actionBlock?.background?.focused ||
|
|
370
|
+
actionBlock?.background?.focus ||
|
|
371
|
+
buttonBlock?.background?.pressed ||
|
|
372
|
+
actionBlock?.background?.pressed;
|
|
373
|
+
|
|
374
|
+
const titleOverride =
|
|
375
|
+
buttonBlock?.title?.default || actionBlock?.title?.default;
|
|
376
|
+
|
|
377
|
+
const iconsOverride = buttonBlock?.icons || actionBlock?.icons;
|
|
378
|
+
const leadingOverride = buttonBlock?.leadingIcon || actionBlock?.leadingIcon;
|
|
379
|
+
|
|
380
|
+
return {
|
|
381
|
+
...base,
|
|
382
|
+
background: mergeButtonBackground(base.background, bgDefault, bgFocused),
|
|
383
|
+
title: mergeButtonTitle(base.title, titleOverride),
|
|
384
|
+
icons: mergeButtonIcons(base.icons, iconsOverride, leadingOverride),
|
|
385
|
+
};
|
|
386
|
+
}
|