@momo-kits/foundation 0.125.4-beta.2 → 0.125.4-beta.3
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.
|
@@ -28,6 +28,7 @@ import {BottomSheetParams} from './types';
|
|
|
28
28
|
import {Colors, Radius, Spacing, Styles} from '../Consts';
|
|
29
29
|
import {Text} from '../Text';
|
|
30
30
|
import {Icon} from '../Icon';
|
|
31
|
+
import layoutStyles from '../Layout/styles';
|
|
31
32
|
|
|
32
33
|
const BottomSheet: React.FC<BottomSheetParams> = props => {
|
|
33
34
|
const {theme, navigator} = useContext(ApplicationContext);
|
|
@@ -51,6 +52,7 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
|
|
|
51
52
|
useScrollOverflow = false,
|
|
52
53
|
keyboardVerticalOffset,
|
|
53
54
|
useDivider = true,
|
|
55
|
+
footerComponent,
|
|
54
56
|
}: BottomSheetParams = props.route.params;
|
|
55
57
|
|
|
56
58
|
const customEasingOpen = Easing.bezier(0.05, 0.7, 0.1, 1);
|
|
@@ -312,10 +314,27 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
|
|
|
312
314
|
{...props.route.params}
|
|
313
315
|
onRequestClose={onRequestClose}
|
|
314
316
|
/>
|
|
315
|
-
{useBottomInset && (
|
|
316
|
-
<View style={{height: Math.min(insets.bottom, 21)}} />
|
|
317
|
-
)}
|
|
318
317
|
</Content>
|
|
318
|
+
{footerComponent && (
|
|
319
|
+
<View
|
|
320
|
+
style={[
|
|
321
|
+
layoutStyles.shadow,
|
|
322
|
+
{
|
|
323
|
+
paddingBottom: Spacing.S,
|
|
324
|
+
backgroundColor: theme.colors.background.surface,
|
|
325
|
+
},
|
|
326
|
+
]}>
|
|
327
|
+
{footerComponent}
|
|
328
|
+
</View>
|
|
329
|
+
)}
|
|
330
|
+
{useBottomInset && (
|
|
331
|
+
<View
|
|
332
|
+
style={{
|
|
333
|
+
height: Math.min(insets.bottom, 21),
|
|
334
|
+
backgroundColor: backgroundColor,
|
|
335
|
+
}}
|
|
336
|
+
/>
|
|
337
|
+
)}
|
|
319
338
|
</Animated.View>
|
|
320
339
|
</KeyboardAvoidingView>
|
|
321
340
|
</Container>
|
|
@@ -105,7 +105,7 @@ const HeaderToolkitAction: React.FC<any> = ({
|
|
|
105
105
|
);
|
|
106
106
|
|
|
107
107
|
const onDismiss = () => {
|
|
108
|
-
if (useCloseIcon
|
|
108
|
+
if (useCloseIcon && !isWhiteList) {
|
|
109
109
|
navigator?.maxApi?.dispatchFunction?.(
|
|
110
110
|
'dismiss',
|
|
111
111
|
navigator?.dismissData,
|
|
@@ -300,7 +300,7 @@ const HeaderToolkitAction: React.FC<any> = ({
|
|
|
300
300
|
<Icon
|
|
301
301
|
color={tintColor}
|
|
302
302
|
source={
|
|
303
|
-
useCloseIcon
|
|
303
|
+
useCloseIcon && !isWhiteList
|
|
304
304
|
? '16_navigation_close_circle'
|
|
305
305
|
: '16_basic_home'
|
|
306
306
|
}
|
package/Application/types.ts
CHANGED
|
@@ -159,6 +159,7 @@ export type BottomSheetParams = {
|
|
|
159
159
|
keyboardVerticalOffset?: number;
|
|
160
160
|
useScrollOverflow?: boolean;
|
|
161
161
|
useDivider?: boolean;
|
|
162
|
+
footerComponent?: React.ReactNode;
|
|
162
163
|
};
|
|
163
164
|
|
|
164
165
|
export interface NavigationButtonProps extends TouchableOpacityProps {
|
package/Popup/PopupNotify.tsx
CHANGED
|
@@ -222,7 +222,7 @@ const PopupNotify: React.FC<PopupNotifyProps> = ({
|
|
|
222
222
|
accessibilityLabel={'description_popup_notify'}
|
|
223
223
|
typography={'body_default_regular'}
|
|
224
224
|
onTextLayout={({nativeEvent: {lines}}) => {
|
|
225
|
-
const enableScroll = lines.length >
|
|
225
|
+
const enableScroll = lines.length > 8.5;
|
|
226
226
|
if (enableScroll !== scrollContent) {
|
|
227
227
|
setScrollContent(enableScroll);
|
|
228
228
|
}
|