2020-11-29 13:23:59 +05:00
|
|
|
import React from 'react';
|
|
|
|
|
import { View } from 'react-native';
|
|
|
|
|
import { useTracked } from '../../provider';
|
|
|
|
|
import { DDS } from '../../services/DeviceDetection';
|
|
|
|
|
import { getElevation } from '../../utils';
|
|
|
|
|
|
2022-01-22 12:57:05 +05:00
|
|
|
const DialogContainer = ({ width, height, ...restProps }) => {
|
|
|
|
|
const [state] = useTracked();
|
2020-11-29 13:23:59 +05:00
|
|
|
const colors = state.colors;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<View
|
|
|
|
|
{...restProps}
|
|
|
|
|
style={{
|
|
|
|
|
...getElevation(5),
|
2021-11-11 13:08: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;
|