@draftbit/core 46.9.1-f8902c.2 → 46.9.1
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/lib/commonjs/components/CircleImage.js +1 -15
- package/lib/commonjs/components/FormRow.js +2 -16
- package/lib/commonjs/components/Justification.js +1 -5
- package/lib/commonjs/components/ResizeMode.js +1 -5
- package/lib/commonjs/index.js +0 -7
- package/lib/module/components/Justification.js +0 -1
- package/lib/module/components/ResizeMode.js +0 -1
- package/lib/module/index.js +0 -1
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +3 -4
- package/src/index.tsx +0 -2
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +0 -89
- package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js +0 -464
- package/lib/commonjs/components/BottomSheet/index.js +0 -13
- package/lib/commonjs/mappings/BottomSheet.js +0 -75
- package/lib/module/components/BottomSheet/BottomSheet.js +0 -81
- package/lib/module/components/BottomSheet/BottomSheetComponent.js +0 -470
- package/lib/module/components/BottomSheet/index.js +0 -1
- package/lib/module/mappings/BottomSheet.js +0 -68
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +0 -20
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +0 -1
- package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts +0 -170
- package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts.map +0 -1
- package/lib/typescript/src/components/BottomSheet/index.d.ts +0 -2
- package/lib/typescript/src/components/BottomSheet/index.d.ts.map +0 -1
- package/lib/typescript/src/mappings/BottomSheet.d.ts +0 -120
- package/lib/typescript/src/mappings/BottomSheet.d.ts.map +0 -1
- package/src/Provider.js +0 -9
- package/src/components/Accordion/AccordionGroup.js +0 -44
- package/src/components/Accordion/AccordionItem.js +0 -32
- package/src/components/Accordion/index.js +0 -2
- package/src/components/ActionSheet/ActionSheet.js +0 -45
- package/src/components/ActionSheet/ActionSheetCancel.js +0 -6
- package/src/components/ActionSheet/ActionSheetItem.js +0 -30
- package/src/components/ActionSheet/index.js +0 -3
- package/src/components/AnimatedCircularProgress.js +0 -43
- package/src/components/AspectRatio.js +0 -18
- package/src/components/AvatarEdit.js +0 -30
- package/src/components/Banner.js +0 -109
- package/src/components/BottomSheet/BottomSheet.js +0 -57
- package/src/components/BottomSheet/BottomSheet.tsx +0 -121
- package/src/components/BottomSheet/BottomSheetComponent.js +0 -437
- package/src/components/BottomSheet/BottomSheetComponent.tsx +0 -895
- package/src/components/BottomSheet/index.js +0 -1
- package/src/components/BottomSheet/index.ts +0 -1
- package/src/components/Button.js +0 -114
- package/src/components/Card.js +0 -57
- package/src/components/Checkbox/Checkbox.js +0 -62
- package/src/components/Checkbox/CheckboxGroup.js +0 -21
- package/src/components/Checkbox/CheckboxGroupRow.js +0 -76
- package/src/components/Checkbox/CheckboxRow.js +0 -77
- package/src/components/Checkbox/context.js +0 -14
- package/src/components/Checkbox/index.js +0 -3
- package/src/components/CircleImage.js +0 -8
- package/src/components/CircularProgress.js +0 -81
- package/src/components/Config.js +0 -64
- package/src/components/Container.js +0 -43
- package/src/components/DatePicker/DatePicker.js +0 -382
- package/src/components/DatePicker/DatePickerComponent.js +0 -13
- package/src/components/DatePicker/DatePickerComponent.web.js +0 -30
- package/src/components/DatePicker/DatePickerComponentType.js +0 -1
- package/src/components/DeckSwiper/DeckSwiper.js +0 -65
- package/src/components/DeckSwiper/DeckSwiperCard.js +0 -21
- package/src/components/DeckSwiper/index.js +0 -2
- package/src/components/DeprecatedButton.js +0 -83
- package/src/components/DeprecatedCardWrapper.js +0 -18
- package/src/components/DeprecatedFAB.js +0 -114
- package/src/components/Divider.js +0 -13
- package/src/components/Elevation.js +0 -20
- package/src/components/FAB.js +0 -46
- package/src/components/FieldSearchBarFull.js +0 -53
- package/src/components/FormRow.js +0 -19
- package/src/components/IconButton.js +0 -35
- package/src/components/Image.js +0 -47
- package/src/components/Justification.js +0 -1
- package/src/components/Layout.js +0 -50
- package/src/components/Markdown.js +0 -10
- package/src/components/NumberInput.js +0 -49
- package/src/components/Picker/Picker.js +0 -266
- package/src/components/Picker/PickerComponent.android.js +0 -69
- package/src/components/Picker/PickerComponent.ios.js +0 -79
- package/src/components/Picker/PickerComponent.web.js +0 -70
- package/src/components/Picker/PickerTypes.js +0 -1
- package/src/components/Portal/Portal.js +0 -35
- package/src/components/Portal/PortalConsumer.js +0 -27
- package/src/components/Portal/PortalHost.js +0 -107
- package/src/components/Portal/PortalManager.js +0 -32
- package/src/components/Pressable.js +0 -12
- package/src/components/ProgressBar.js +0 -118
- package/src/components/ProgressCircle.js +0 -13
- package/src/components/ProgressIndicator.js +0 -27
- package/src/components/RadioButton/RadioButton.js +0 -17
- package/src/components/RadioButton/RadioButtonFieldGroup.js +0 -17
- package/src/components/RadioButton/RadioButtonGroup.js +0 -43
- package/src/components/RadioButton/RadioButtonRow.js +0 -76
- package/src/components/RadioButton/context.js +0 -14
- package/src/components/RadioButton/index.js +0 -4
- package/src/components/ResizeMode.js +0 -1
- package/src/components/Row.js +0 -48
- package/src/components/RowBodyIcon.js +0 -8
- package/src/components/RowHeadlineImageCaption.js +0 -12
- package/src/components/RowHeadlineImageIcon.js +0 -14
- package/src/components/SVG.js +0 -13
- package/src/components/ScreenContainer.js +0 -35
- package/src/components/Shadow.js +0 -16
- package/src/components/Slider.js +0 -63
- package/src/components/StarRating.js +0 -50
- package/src/components/StepIndicator.js +0 -346
- package/src/components/Stepper.js +0 -41
- package/src/components/Surface.js +0 -32
- package/src/components/Swiper/Swiper.js +0 -29
- package/src/components/Swiper/SwiperItem.js +0 -9
- package/src/components/Swiper/index.js +0 -2
- package/src/components/Switch.js +0 -56
- package/src/components/TabView/TabView.js +0 -54
- package/src/components/TabView/TabViewItem.js +0 -11
- package/src/components/TabView/index.js +0 -2
- package/src/components/Text.js +0 -33
- package/src/components/TextField.js +0 -428
- package/src/components/ToggleButton.js +0 -39
- package/src/components/Touchable.js +0 -12
- package/src/components/Touchable.web.js +0 -2
- package/src/components/Typography.js +0 -36
- package/src/components/useAuthState.js +0 -31
- package/src/constants.js +0 -10
- package/src/hooks.js +0 -12
- package/src/index.js +0 -50
- package/src/interfaces/Icon.js +0 -8
- package/src/mappings/Accordion.js +0 -50
- package/src/mappings/AccordionItem.js +0 -17
- package/src/mappings/ActionSheet.js +0 -14
- package/src/mappings/ActionSheetCancel.js +0 -20
- package/src/mappings/ActionSheetItem.js +0 -24
- package/src/mappings/ActivityIndicator.js +0 -58
- package/src/mappings/AudioPlayer.js +0 -57
- package/src/mappings/AvatarEdit.js +0 -38
- package/src/mappings/Banner.js +0 -32
- package/src/mappings/BlurView.js +0 -42
- package/src/mappings/BottomSheet.js +0 -64
- package/src/mappings/BottomSheet.ts +0 -78
- package/src/mappings/Button.js +0 -116
- package/src/mappings/Card.js +0 -52
- package/src/mappings/CardBlock.js +0 -123
- package/src/mappings/CardContainer.js +0 -104
- package/src/mappings/CardContainerRating.js +0 -126
- package/src/mappings/CardContainerShortImage.js +0 -120
- package/src/mappings/CardInline.js +0 -52
- package/src/mappings/Carousel.js +0 -19
- package/src/mappings/Checkbox.js +0 -46
- package/src/mappings/CheckboxGroup.js +0 -26
- package/src/mappings/CheckboxRow.js +0 -61
- package/src/mappings/CircleImage.js +0 -25
- package/src/mappings/Container.js +0 -30
- package/src/mappings/CustomCode.js +0 -8
- package/src/mappings/DatePicker.js +0 -182
- package/src/mappings/DeckSwiper.js +0 -48
- package/src/mappings/DeckSwiperCard.js +0 -16
- package/src/mappings/Divider.js +0 -27
- package/src/mappings/FAB.js +0 -37
- package/src/mappings/Fetch.js +0 -13
- package/src/mappings/FieldSearchBarFull.js +0 -50
- package/src/mappings/FlashList.js +0 -113
- package/src/mappings/FlatList.js +0 -51
- package/src/mappings/HeaderLarge.js +0 -29
- package/src/mappings/HeaderMedium.js +0 -55
- package/src/mappings/HeaderOverline.js +0 -55
- package/src/mappings/Icon.js +0 -32
- package/src/mappings/IconButton.js +0 -33
- package/src/mappings/Image.js +0 -35
- package/src/mappings/ImageBackground.js +0 -29
- package/src/mappings/KeyboardAvoidingView.js +0 -41
- package/src/mappings/KeyboardAwareScrollView.js +0 -50
- package/src/mappings/Layout.js +0 -200
- package/src/mappings/LinearGradient.js +0 -82
- package/src/mappings/MapCallout.js +0 -22
- package/src/mappings/MapMarker.js +0 -48
- package/src/mappings/MapView.js +0 -142
- package/src/mappings/Markdown.js +0 -25
- package/src/mappings/Modal.js +0 -42
- package/src/mappings/NumberInput.js +0 -254
- package/src/mappings/Picker.js +0 -153
- package/src/mappings/ProgressBar.js +0 -101
- package/src/mappings/ProgressCircle.js +0 -109
- package/src/mappings/ProgressIndicator.js +0 -181
- package/src/mappings/RadioButton.js +0 -51
- package/src/mappings/RadioButtonGroup.js +0 -17
- package/src/mappings/RadioButtonRow.js +0 -42
- package/src/mappings/RowBodyIcon.js +0 -75
- package/src/mappings/RowHeadlineImageCaption.js +0 -167
- package/src/mappings/RowHeadlineImageIcon.js +0 -99
- package/src/mappings/SVG.js +0 -20
- package/src/mappings/SafeAreaView.js +0 -33
- package/src/mappings/ScrollView.js +0 -37
- package/src/mappings/Shadow.js +0 -95
- package/src/mappings/Slider.js +0 -60
- package/src/mappings/StarRating.js +0 -43
- package/src/mappings/Stepper.js +0 -32
- package/src/mappings/Surface.js +0 -14
- package/src/mappings/Swiper.js +0 -71
- package/src/mappings/SwiperItem.js +0 -9
- package/src/mappings/Switch.js +0 -81
- package/src/mappings/TabView.js +0 -75
- package/src/mappings/TabViewItem.js +0 -30
- package/src/mappings/Text.js +0 -251
- package/src/mappings/TextArea.js +0 -283
- package/src/mappings/TextField.js +0 -400
- package/src/mappings/TextInput.js +0 -402
- package/src/mappings/ToggleButton.js +0 -50
- package/src/mappings/Touchable.js +0 -67
- package/src/mappings/Video.js +0 -81
- package/src/mappings/View.js +0 -207
- package/src/mappings/WebView.js +0 -88
- package/src/styles/DarkTheme.js +0 -26
- package/src/styles/DefaultTheme.js +0 -111
- package/src/styles/fonts.js +0 -62
- package/src/styles/overlay.js +0 -60
- package/src/styles/shadow.js +0 -51
- package/src/theming.js +0 -3
- package/src/utilities.js +0 -102
package/src/components/Banner.js
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Button, Text, View, StyleSheet, Animated, } from "react-native";
|
|
3
|
-
import Surface from "./Surface";
|
|
4
|
-
import shadow from "../styles/shadow";
|
|
5
|
-
import { withTheme } from "../theming";
|
|
6
|
-
const ELEVATION = 1;
|
|
7
|
-
const DEFAULT_MAX_WIDTH = 960;
|
|
8
|
-
const Banner = ({ initiallyVisible = true, dismissable = true, icon, buttonColor, content, contentStyle, style, theme, Icon, ...rest }) => {
|
|
9
|
-
const [visible, setVisible] = React.useState(initiallyVisible);
|
|
10
|
-
React.useEffect(() => {
|
|
11
|
-
if (initiallyVisible) {
|
|
12
|
-
setVisible(true);
|
|
13
|
-
}
|
|
14
|
-
}, [initiallyVisible]);
|
|
15
|
-
const { current: position } = React.useRef(new Animated.Value(visible ? 1 : 0));
|
|
16
|
-
const [layout, setLayout] = React.useState({
|
|
17
|
-
height: 0,
|
|
18
|
-
measured: false,
|
|
19
|
-
});
|
|
20
|
-
React.useEffect(() => {
|
|
21
|
-
if (visible) {
|
|
22
|
-
// show
|
|
23
|
-
Animated.timing(position, {
|
|
24
|
-
duration: 250,
|
|
25
|
-
toValue: 1,
|
|
26
|
-
useNativeDriver: false,
|
|
27
|
-
}).start();
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
// hide
|
|
31
|
-
Animated.timing(position, {
|
|
32
|
-
duration: 200,
|
|
33
|
-
toValue: 0,
|
|
34
|
-
useNativeDriver: false,
|
|
35
|
-
}).start();
|
|
36
|
-
}
|
|
37
|
-
}, [visible, position]);
|
|
38
|
-
const handleLayout = ({ nativeEvent }) => {
|
|
39
|
-
const { height } = nativeEvent.layout;
|
|
40
|
-
setLayout({ height, measured: true });
|
|
41
|
-
};
|
|
42
|
-
// The banner animation has 2 parts:
|
|
43
|
-
// 1. Blank spacer element which animates its height to move the content
|
|
44
|
-
// 2. Actual banner which animates its translateY
|
|
45
|
-
// In initial render, we position everything normally and measure the height of the banner
|
|
46
|
-
// Once we have the height, we apply the height to the spacer and switch the banner to position: absolute
|
|
47
|
-
// We need this because we need to move the content below as if banner's height was being animated
|
|
48
|
-
// However we can't animated banner's height directly as it'll also resize the content inside
|
|
49
|
-
const height = Animated.multiply(position, layout.height);
|
|
50
|
-
const translateY = Animated.multiply(Animated.add(position, -1), layout.height);
|
|
51
|
-
return (React.createElement(Surface, { ...rest, style: [styles.container, shadow(ELEVATION), style] },
|
|
52
|
-
React.createElement(View, { style: [styles.wrapper, contentStyle] },
|
|
53
|
-
React.createElement(Animated.View, { style: { height } }),
|
|
54
|
-
React.createElement(Animated.View, { onLayout: handleLayout, style: [
|
|
55
|
-
layout.measured || !visible
|
|
56
|
-
? // If we have measured banner's height or it's invisible,
|
|
57
|
-
// Position it absolutely, the layout will be taken care of the spacer
|
|
58
|
-
[styles.absolute, { transform: [{ translateY }] }]
|
|
59
|
-
: // Otherwise position it normally
|
|
60
|
-
null,
|
|
61
|
-
!layout.measured && !visible
|
|
62
|
-
? // If we haven't measured banner's height yet and it's invisible,
|
|
63
|
-
// hide it with opacity: 0 so user doesn't see it
|
|
64
|
-
{ opacity: 0 }
|
|
65
|
-
: null,
|
|
66
|
-
] },
|
|
67
|
-
React.createElement(View, { style: [styles.content, { marginBottom: dismissable ? 0 : 16 }] },
|
|
68
|
-
icon ? (React.createElement(View, { style: styles.icon },
|
|
69
|
-
React.createElement(Icon, { name: icon, size: 40 }))) : null,
|
|
70
|
-
React.createElement(Text, { style: [styles.message, { color: theme.colors.text }], accessibilityLiveRegion: visible ? "polite" : "none", accessibilityRole: "alert" }, content)),
|
|
71
|
-
dismissable ? (React.createElement(View, { style: styles.actions },
|
|
72
|
-
React.createElement(Button, { color: buttonColor || theme.colors.primary, title: "Close", onPress: () => setVisible(false) }))) : null))));
|
|
73
|
-
};
|
|
74
|
-
const styles = StyleSheet.create({
|
|
75
|
-
container: {
|
|
76
|
-
elevation: ELEVATION,
|
|
77
|
-
},
|
|
78
|
-
wrapper: {
|
|
79
|
-
overflow: "hidden",
|
|
80
|
-
alignSelf: "center",
|
|
81
|
-
width: "100%",
|
|
82
|
-
maxWidth: DEFAULT_MAX_WIDTH,
|
|
83
|
-
},
|
|
84
|
-
absolute: {
|
|
85
|
-
position: "absolute",
|
|
86
|
-
top: 0,
|
|
87
|
-
width: "100%",
|
|
88
|
-
},
|
|
89
|
-
content: {
|
|
90
|
-
flexDirection: "row",
|
|
91
|
-
justifyContent: "flex-start",
|
|
92
|
-
marginHorizontal: 8,
|
|
93
|
-
marginTop: 16,
|
|
94
|
-
marginBottom: 0,
|
|
95
|
-
},
|
|
96
|
-
icon: {
|
|
97
|
-
margin: 8,
|
|
98
|
-
},
|
|
99
|
-
message: {
|
|
100
|
-
flex: 1,
|
|
101
|
-
margin: 8,
|
|
102
|
-
},
|
|
103
|
-
actions: {
|
|
104
|
-
flexDirection: "row",
|
|
105
|
-
justifyContent: "flex-end",
|
|
106
|
-
margin: 8,
|
|
107
|
-
},
|
|
108
|
-
});
|
|
109
|
-
export default withTheme(Banner);
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { StyleSheet, View, } from "react-native";
|
|
3
|
-
import BottomSheetComponent from "./BottomSheetComponent";
|
|
4
|
-
import { withTheme } from "../../theming";
|
|
5
|
-
const BottomSheet = ({ theme, snapPoints = ["10%", "50%", "80%"], initialSnapIndex = 0, showHandle = true, handleColor = theme.colors.divider, topBorderRadius = 20, borderWidth = 1, borderColor = theme.colors.divider, onSettle, style, children, ...rest }) => {
|
|
6
|
-
const backgroundColor = (style === null || style === void 0 ? void 0 : style.backgroundColor) || theme.colors.background;
|
|
7
|
-
return (React.createElement(View, { style: styles.parentContainer, pointerEvents: "box-none" },
|
|
8
|
-
React.createElement(BottomSheetComponent, { componentType: "ScrollView", snapPoints: snapPoints, initialSnapIndex: initialSnapIndex, renderHandle: () => (React.createElement(React.Fragment, null, showHandle && (React.createElement(View, { style: [
|
|
9
|
-
styles.handleContainer,
|
|
10
|
-
{
|
|
11
|
-
backgroundColor,
|
|
12
|
-
borderTopLeftRadius: topBorderRadius,
|
|
13
|
-
borderTopRightRadius: topBorderRadius,
|
|
14
|
-
},
|
|
15
|
-
] },
|
|
16
|
-
React.createElement(View, { style: [styles.handle, { backgroundColor: handleColor }] }))))), contentContainerStyle: [styles.contentContainerStyle, style], containerStyle: StyleSheet.flatten([
|
|
17
|
-
styles.containerStyle,
|
|
18
|
-
{
|
|
19
|
-
backgroundColor,
|
|
20
|
-
borderTopLeftRadius: topBorderRadius,
|
|
21
|
-
borderTopRightRadius: topBorderRadius,
|
|
22
|
-
borderWidth,
|
|
23
|
-
borderColor,
|
|
24
|
-
},
|
|
25
|
-
]), onSettle: onSettle, ...rest }, children)));
|
|
26
|
-
};
|
|
27
|
-
const styles = StyleSheet.create({
|
|
28
|
-
//Render on top of everything
|
|
29
|
-
parentContainer: {
|
|
30
|
-
position: "absolute",
|
|
31
|
-
left: 0,
|
|
32
|
-
right: 0,
|
|
33
|
-
top: 0,
|
|
34
|
-
bottom: 0,
|
|
35
|
-
zIndex: 10,
|
|
36
|
-
overflow: "hidden",
|
|
37
|
-
},
|
|
38
|
-
contentContainerStyle: {
|
|
39
|
-
paddingHorizontal: 16,
|
|
40
|
-
paddingVertical: 10,
|
|
41
|
-
flex: 1,
|
|
42
|
-
},
|
|
43
|
-
containerStyle: {
|
|
44
|
-
flex: 1,
|
|
45
|
-
overflow: "hidden",
|
|
46
|
-
},
|
|
47
|
-
handleContainer: {
|
|
48
|
-
alignItems: "center",
|
|
49
|
-
paddingVertical: 20,
|
|
50
|
-
},
|
|
51
|
-
handle: {
|
|
52
|
-
width: 40,
|
|
53
|
-
height: 2,
|
|
54
|
-
borderRadius: 4,
|
|
55
|
-
},
|
|
56
|
-
});
|
|
57
|
-
export default withTheme(BottomSheet);
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
StyleSheet,
|
|
4
|
-
View,
|
|
5
|
-
StyleProp,
|
|
6
|
-
ViewStyle,
|
|
7
|
-
ScrollViewProps,
|
|
8
|
-
} from "react-native";
|
|
9
|
-
|
|
10
|
-
import BottomSheetComponent from "./BottomSheetComponent";
|
|
11
|
-
import type { Theme } from "../../styles/DefaultTheme";
|
|
12
|
-
import { withTheme } from "../../theming";
|
|
13
|
-
|
|
14
|
-
export interface BottomSheetProps extends ScrollViewProps {
|
|
15
|
-
snapPoints?: (string | number)[];
|
|
16
|
-
initialSnapIndex?: number;
|
|
17
|
-
showHandle?: boolean;
|
|
18
|
-
handleColor?: string;
|
|
19
|
-
topBorderRadius?: number;
|
|
20
|
-
borderWidth?: number;
|
|
21
|
-
borderColor?: string;
|
|
22
|
-
onSettle?: (index: number) => void;
|
|
23
|
-
style?: StyleProp<ViewStyle>;
|
|
24
|
-
theme: Theme;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const BottomSheet: React.FC<React.PropsWithChildren<BottomSheetProps>> = ({
|
|
28
|
-
theme,
|
|
29
|
-
snapPoints = ["10%", "50%", "80%"],
|
|
30
|
-
initialSnapIndex = 0,
|
|
31
|
-
showHandle = true,
|
|
32
|
-
handleColor = theme.colors.divider,
|
|
33
|
-
topBorderRadius = 20,
|
|
34
|
-
borderWidth = 1,
|
|
35
|
-
borderColor = theme.colors.divider,
|
|
36
|
-
onSettle,
|
|
37
|
-
style,
|
|
38
|
-
children,
|
|
39
|
-
...rest
|
|
40
|
-
}) => {
|
|
41
|
-
const backgroundColor =
|
|
42
|
-
(style as ViewStyle)?.backgroundColor || theme.colors.background;
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<View style={styles.parentContainer} pointerEvents="box-none">
|
|
46
|
-
<BottomSheetComponent
|
|
47
|
-
componentType="ScrollView"
|
|
48
|
-
snapPoints={snapPoints}
|
|
49
|
-
initialSnapIndex={initialSnapIndex}
|
|
50
|
-
renderHandle={() => (
|
|
51
|
-
<>
|
|
52
|
-
{showHandle && (
|
|
53
|
-
<View
|
|
54
|
-
style={[
|
|
55
|
-
styles.handleContainer,
|
|
56
|
-
{
|
|
57
|
-
backgroundColor,
|
|
58
|
-
borderTopLeftRadius: topBorderRadius,
|
|
59
|
-
borderTopRightRadius: topBorderRadius,
|
|
60
|
-
},
|
|
61
|
-
]}
|
|
62
|
-
>
|
|
63
|
-
<View
|
|
64
|
-
style={[styles.handle, { backgroundColor: handleColor }]}
|
|
65
|
-
/>
|
|
66
|
-
</View>
|
|
67
|
-
)}
|
|
68
|
-
</>
|
|
69
|
-
)}
|
|
70
|
-
contentContainerStyle={[styles.contentContainerStyle, style]}
|
|
71
|
-
containerStyle={StyleSheet.flatten([
|
|
72
|
-
styles.containerStyle,
|
|
73
|
-
{
|
|
74
|
-
backgroundColor,
|
|
75
|
-
borderTopLeftRadius: topBorderRadius,
|
|
76
|
-
borderTopRightRadius: topBorderRadius,
|
|
77
|
-
borderWidth,
|
|
78
|
-
borderColor,
|
|
79
|
-
},
|
|
80
|
-
])}
|
|
81
|
-
onSettle={onSettle}
|
|
82
|
-
{...rest}
|
|
83
|
-
>
|
|
84
|
-
{children}
|
|
85
|
-
</BottomSheetComponent>
|
|
86
|
-
</View>
|
|
87
|
-
);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
const styles = StyleSheet.create({
|
|
91
|
-
//Render on top of everything
|
|
92
|
-
parentContainer: {
|
|
93
|
-
position: "absolute",
|
|
94
|
-
left: 0,
|
|
95
|
-
right: 0,
|
|
96
|
-
top: 0,
|
|
97
|
-
bottom: 0,
|
|
98
|
-
zIndex: 10,
|
|
99
|
-
overflow: "hidden",
|
|
100
|
-
},
|
|
101
|
-
contentContainerStyle: {
|
|
102
|
-
paddingHorizontal: 16,
|
|
103
|
-
paddingVertical: 10,
|
|
104
|
-
flex: 1,
|
|
105
|
-
},
|
|
106
|
-
containerStyle: {
|
|
107
|
-
flex: 1,
|
|
108
|
-
overflow: "hidden",
|
|
109
|
-
},
|
|
110
|
-
handleContainer: {
|
|
111
|
-
alignItems: "center",
|
|
112
|
-
paddingVertical: 20,
|
|
113
|
-
},
|
|
114
|
-
handle: {
|
|
115
|
-
width: 40,
|
|
116
|
-
height: 2,
|
|
117
|
-
borderRadius: 4,
|
|
118
|
-
},
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
export default withTheme(BottomSheet);
|