forked from METS-Programme/esm-ugandaemr-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoverlay.tsx
More file actions
24 lines (19 loc) · 659 Bytes
/
overlay.tsx
File metadata and controls
24 lines (19 loc) · 659 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import React from 'react';
import { isDesktop, useLayoutType } from '@openmrs/esm-framework';
import styles from './overlay.scss';
interface OverlayProps {
close: () => void;
children?: React.ReactNode;
header: string;
buttonsGroup?: React.ReactElement;
}
const Overlay: React.FC<OverlayProps> = ({ close, children, header, buttonsGroup }) => {
const layout = useLayoutType();
return (
<div className={isDesktop(layout) ? styles.desktopOverlay : styles.tabletOverlay}>
<div className={styles.overlayContent}>{children}</div>
<div className={styles.buttonsGroup}>{buttonsGroup}</div>
</div>
);
};
export default Overlay;