1
0
mirror of https://github.com/mgerb/ps-launcher synced 2026-01-12 03:12:50 +00:00

wip - add/edit server with modal

This commit is contained in:
2017-10-26 23:39:46 -05:00
parent 5db4b138e0
commit 0df1e284f9
10 changed files with 282 additions and 50 deletions

View File

@@ -0,0 +1,33 @@
import React from 'react';
import './Modal.scss';
interface Props {
isOpen: boolean;
title: string;
onClose?(): any;
}
export class Modal extends React.Component<Props, any> {
constructor(props: Props) {
super(props);
}
public render(): any {
const { isOpen, onClose, title } = this.props;
const hiddenClass = !isOpen ? 'CustomModal--hidden' : '';
return (
<div className={'CustomModal__base ' + hiddenClass}>
<div className="CustomModal__content">
<div className="CustomModal__header">
<h3>{title}</h3>
</div>
{this.props.children}
</div>
<div className="CustomModal__overlay" onClick={onClose.bind(this)} />
</div>
);
}
}