1
0
mirror of https://github.com/mgerb/ps-launcher synced 2026-01-10 02:22:49 +00:00

add/update/delete servers

This commit is contained in:
2017-10-29 12:57:26 -05:00
parent 5db4b138e0
commit 9806b8ebe6
16 changed files with 483 additions and 71 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>
);
}
}