2022-08-26 16:19:39 +05:00
|
|
|
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 }) => {
|
2022-08-26 16:19:39 +05:00
|
|
|
const colors = useThemeStore((state) => state.colors);
|
2020-11-29 13:23:59 +05:00
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<View
|
|
|
|
|
{...restProps}
|
|
|
|
|
style={{
|
|
|
|
|
...getElevation(5),
|
2022-08-26 16:19:39 +05:00
|
|
|
width: width || DDS.isTab ? 500 : "85%",
|
2021-06-14 08:38:03 +05:00
|
|
|
maxHeight: height || 450,
|
2021-11-08 15:06:46 +05:00
|
|
|
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;
|