mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-21 12:29:36 +02:00
UI Components
This commit is contained in:
parent
fa5c35b619
commit
f34bbd938d
10 changed files with 131 additions and 7 deletions
19
client/src/components/UI/Modal/Modal.tsx
Normal file
19
client/src/components/UI/Modal/Modal.tsx
Normal file
|
@ -0,0 +1,19 @@
|
|||
import classes from './Modal.module.css';
|
||||
import Icon from '../Icon/Icon';
|
||||
|
||||
interface ComponentProps {
|
||||
isOpen: boolean;
|
||||
children: JSX.Element;
|
||||
}
|
||||
|
||||
const Modal = (props: ComponentProps): JSX.Element => {
|
||||
const modalClasses = [classes.Modal, props.isOpen ? classes.ModalOpen : classes.ModalClose].join(' ');
|
||||
|
||||
return (
|
||||
<div className={modalClasses}>
|
||||
{props.children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Modal;
|
Loading…
Add table
Add a link
Reference in a new issue