unicorn-demo-app 8.4.3 → 8.5.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/package.json
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
ScreenFooterLayouts,
|
|
11
11
|
ScreenFooterBackgrounds,
|
|
12
12
|
KeyboardBehavior,
|
|
13
|
+
ScreenFooterAnimationTypeProp,
|
|
13
14
|
FooterAlignment,
|
|
14
15
|
HorizontalItemsDistribution,
|
|
15
16
|
ItemsFit,
|
|
@@ -88,6 +89,12 @@ const KEYBOARD_BEHAVIOR_OPTIONS = [
|
|
|
88
89
|
{label: 'Hoisted', value: KeyboardBehavior.HOISTED}
|
|
89
90
|
];
|
|
90
91
|
|
|
92
|
+
const ANIMATION_TYPE_OPTIONS = [
|
|
93
|
+
{label: 'Slide', value: 'slide'},
|
|
94
|
+
{label: 'Fade', value: 'fade'},
|
|
95
|
+
{label: 'None', value: 'none'}
|
|
96
|
+
];
|
|
97
|
+
|
|
91
98
|
const KEYBOARD_BEHAVIOR_OPTIONS_SPACED = [
|
|
92
99
|
{label: 'Sticky', value: KeyboardBehavior.STICKY},
|
|
93
100
|
{label: 'Hoisted', value: KeyboardBehavior.HOISTED},
|
|
@@ -115,6 +122,7 @@ const ScreenFooterContent = () => {
|
|
|
115
122
|
const [layout, setLayout] = useState<ScreenFooterLayouts>(ScreenFooterLayouts.HORIZONTAL);
|
|
116
123
|
const [background, setBackground] = useState<ScreenFooterBackgrounds>(ScreenFooterBackgrounds.SOLID);
|
|
117
124
|
const [keyboardBehavior, setKeyboardBehavior] = useState<KeyboardBehavior>(KeyboardBehavior.STICKY);
|
|
125
|
+
const [animationType, setAnimationType] = useState<ScreenFooterAnimationTypeProp>('slide');
|
|
118
126
|
const [alignment, setAlignment] = useState<FooterAlignment>(FooterAlignment.CENTER);
|
|
119
127
|
const [horizontalAlignment, setHorizontalAlignment] = useState<FooterAlignment>(FooterAlignment.CENTER);
|
|
120
128
|
const [distribution, setDistribution] = useState<HorizontalItemsDistribution>(HorizontalItemsDistribution.STACK);
|
|
@@ -390,6 +398,21 @@ const ScreenFooterContent = () => {
|
|
|
390
398
|
</View>
|
|
391
399
|
</View>
|
|
392
400
|
|
|
401
|
+
{/* Animation type */}
|
|
402
|
+
<View marginB-s4>
|
|
403
|
+
<Text text70M marginB-s2>
|
|
404
|
+
Animation Type
|
|
405
|
+
</Text>
|
|
406
|
+
<View row>
|
|
407
|
+
<SegmentedControl
|
|
408
|
+
segments={ANIMATION_TYPE_OPTIONS}
|
|
409
|
+
initialIndex={ANIMATION_TYPE_OPTIONS.findIndex(opt => opt.value === animationType)}
|
|
410
|
+
onChangeIndex={index => setAnimationType(ANIMATION_TYPE_OPTIONS[index].value)}
|
|
411
|
+
/>
|
|
412
|
+
<View flex />
|
|
413
|
+
</View>
|
|
414
|
+
</View>
|
|
415
|
+
|
|
393
416
|
{/* Alignment (Cross Axis) */}
|
|
394
417
|
<View marginB-s4>
|
|
395
418
|
<Text text70M marginB-s2>
|
|
@@ -478,6 +501,7 @@ const ScreenFooterContent = () => {
|
|
|
478
501
|
layout={layout}
|
|
479
502
|
backgroundType={background}
|
|
480
503
|
keyboardBehavior={keyboardBehavior}
|
|
504
|
+
animationType={animationType}
|
|
481
505
|
alignment={alignment}
|
|
482
506
|
horizontalAlignment={horizontalAlignment}
|
|
483
507
|
horizontalItemsDistribution={distribution}
|