Files
notesnook/apps/mobile/src/components/dialog/DialogContainer.js

27 lines
645 B
JavaScript
Raw Normal View History

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,
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;