renamed panel to popup since that's kinda what it is lmao

This commit is contained in:
Sriram Hariharan
2023-03-05 20:50:40 -06:00
parent 295b466505
commit 6d69cd2548
6 changed files with 35 additions and 35 deletions

View File

@@ -0,0 +1,24 @@
@import 'src/views/styles/base.module.scss';
.container {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
position: fixed;
top: 0;
&.overlay {
background-color: rgba(0, 0, 0, 0.5);
z-index: 2147483647;
}
}
.body {
overflow-y: auto;
z-index: 2147483647;
background-color: $white;
box-shadow: 0px 12px 30px 0px #323e5f29;
transition: box-shadow 0.15s;
}

View File

@@ -0,0 +1,32 @@
import classNames from 'classnames';
import React, { PropsWithChildren } from 'react';
import styles from './Popup.module.scss';
interface Props {
testId?: string;
style?: React.CSSProperties;
className?: string;
/** Should it display a subtle dark overlay over the rest of the screen */
overlay?: boolean;
}
/**
*
*/
export default function Popup(props: PropsWithChildren<Props>) {
return (
<div
style={props.style}
className={classNames(
styles.container,
{
[styles.overlay]: props.overlay,
},
props.className
)}
data-testid={props.testId}
>
<div className={styles.body}>{props.children}</div>
</div>
);
}