Files
notesnook/apps/mobile/app/components/dialog/dialog-container.js

25 lines
630 B
JavaScript
Raw Normal View History

import { View } from "react-native";
import { useThemeStore } from "../../stores/use-theme-store";
import { DDS } from "../../services/device-detection";
import { getElevation } from "../../utils";
2020-11-29 13:23:59 +05:00
2022-01-22 12:57:05 +05:00
const DialogContainer = ({ width, height, ...restProps }) => {
const colors = useThemeStore((state) => state.colors);
2020-11-29 13:23:59 +05:00
return (
<View
{...restProps}
style={{
...getElevation(5),
width: width || DDS.isTab ? 500 : "85%",
2021-06-14 08:38:03 +05:00
maxHeight: height || 450,
borderRadius: 10,
2020-11-29 13:23:59 +05:00
backgroundColor: colors.bg,
2022-01-22 12:57:05 +05:00
paddingTop: 12
2020-11-29 13:23:59 +05:00
}}
/>
);
};
export default DialogContainer;