react-native-boxes 1.4.18 → 1.4.20
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 +1 -1
- package/src/Modal.tsx +11 -5
package/package.json
CHANGED
package/src/Modal.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useContext, useEffect, useRef, useState } from 'react';
|
|
3
|
-
import { Animated, Button, Easing, LayoutChangeEvent, Linking, Modal, Platform, Pressable, ScrollView, StyleProp, StyleSheet, TextStyle, TouchableHighlight, TouchableOpacity, View, ViewProps } from 'react-native';
|
|
3
|
+
import { Animated, Button, Easing, LayoutChangeEvent, Linking, Modal, Platform, Pressable, ScrollView, StyleProp, StyleSheet, TextStyle, TouchableHighlight, TouchableOpacity, View, ViewProps, ViewStyle } from 'react-native';
|
|
4
4
|
import { getIcon, Icon, IconProps } from './Image';
|
|
5
5
|
import { getNavParamsFromDeeplink, isDesktop, isWeb } from './utils';
|
|
6
6
|
import { ThemeContext } from './ThemeContext';
|
|
@@ -484,7 +484,7 @@ export const DropDownView = (props: DropDownViewProps) => {
|
|
|
484
484
|
readOnly={true}
|
|
485
485
|
placeholder={props.title}
|
|
486
486
|
{...props}
|
|
487
|
-
value={getSelected()?.title || getSelected()?.id}
|
|
487
|
+
value={getSelected()?.title || getSelected()?.id || props.title}
|
|
488
488
|
onIconPress={() => { setVisible(true) }}
|
|
489
489
|
icon={"caret-down"}
|
|
490
490
|
pointerEvents="none"
|
|
@@ -518,7 +518,9 @@ export type ConfirmationDialogProps = {
|
|
|
518
518
|
message?: string,
|
|
519
519
|
confirmText?: String,
|
|
520
520
|
cancelText?: String,
|
|
521
|
-
children?: any
|
|
521
|
+
children?: any,
|
|
522
|
+
noSheet?: boolean,
|
|
523
|
+
style?: ViewStyle
|
|
522
524
|
}
|
|
523
525
|
|
|
524
526
|
export function ConfirmationDialog(props: ConfirmationDialogProps) {
|
|
@@ -526,8 +528,12 @@ export function ConfirmationDialog(props: ConfirmationDialogProps) {
|
|
|
526
528
|
const confirmText = props.confirmText || 'Confirm'
|
|
527
529
|
const cancelText = props.cancelText || 'Cancel'
|
|
528
530
|
const theme = useContext(ThemeContext)
|
|
531
|
+
const Conatiner = props?.noSheet ? VBox : BottomSheet
|
|
529
532
|
return (
|
|
530
|
-
<
|
|
533
|
+
<Conatiner
|
|
534
|
+
style={[props?.noSheet ? {
|
|
535
|
+
display: props.visible ? 'flex' : 'none'
|
|
536
|
+
} : {}, props.style]}
|
|
531
537
|
onDismiss={() => {
|
|
532
538
|
props.onDismiss && props.onDismiss()
|
|
533
539
|
}}
|
|
@@ -552,7 +558,7 @@ export function ConfirmationDialog(props: ConfirmationDialogProps) {
|
|
|
552
558
|
}} />
|
|
553
559
|
</VBox>
|
|
554
560
|
|
|
555
|
-
</
|
|
561
|
+
</Conatiner>
|
|
556
562
|
)
|
|
557
563
|
}
|
|
558
564
|
|