mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
27 lines
645 B
JavaScript
27 lines
645 B
JavaScript
import React from 'react';
|
|
import { View } from 'react-native';
|
|
import { useTracked } from '../../provider';
|
|
import { DDS } from '../../services/DeviceDetection';
|
|
import { getElevation } from '../../utils';
|
|
|
|
const DialogContainer = ({ width, height, ...restProps }) => {
|
|
const [state] = useTracked();
|
|
const colors = state.colors;
|
|
|
|
return (
|
|
<View
|
|
{...restProps}
|
|
style={{
|
|
...getElevation(5),
|
|
width: width || DDS.isTab ? 500 : '85%',
|
|
maxHeight: height || 450,
|
|
borderRadius: 10,
|
|
backgroundColor: colors.bg,
|
|
paddingTop: 12
|
|
}}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default DialogContainer;
|