Skip to content

Commit 7f46c65

Browse files
Add support for bottom sheets dark mode
1 parent 0d6aa70 commit 7f46c65

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

styles/native/ts/core/widgets/bottomsheet.ts

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { background, border } from "../variables";
1+
import { background, border, contrast } from "../variables";
2+
import { isIphoneWithNotch } from "../helpers/_functions/device";
23
import { BottomSheetType } from "../../types/widgets";
34

45
//
@@ -37,6 +38,29 @@ export const com_mendix_widget_native_bottomsheet_BottomSheet: BottomSheetType =
3738
},
3839
modal: {
3940
// All ViewStyle properties are allowed
41+
margin: 0,
42+
justifyContent: "flex-end"
43+
},
44+
basicModal: {
45+
backdrop: {
46+
// All ViewStyle properties are allowed
47+
paddingBottom: isIphoneWithNotch ? 24 : 0,
48+
flex: 1,
49+
flexDirection: "row",
50+
},
51+
container: {
52+
// All ViewStyle properties are allowed
53+
flex: 1,
54+
alignSelf: "flex-end",
55+
backgroundColor: "#e5e5e5"
56+
},
57+
item: {
58+
// All ViewStyle properties + rippleColor: string
59+
height: 50,
60+
alignItems: "center",
61+
justifyContent: "center",
62+
rippleColor: contrast.lower,
63+
},
4064
},
4165
modalItems: {
4266
defaultStyle: {

styles/native/ts/types/widgets.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ export interface BadgeType {
4545
export interface BottomSheetType {
4646
container?: ViewStyle,
4747
containerWhenExpandedFullscreen?: ViewStyle,
48+
basicModal?: {
49+
backdrop?: ViewStyle;
50+
container?: ViewStyle;
51+
item?: ViewStyle & { rippleColor?: string };
52+
},
4853
modal?: ViewStyle,
4954
modalItems?: {
5055
defaultStyle?: TextStyle;

0 commit comments

Comments
 (0)