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:
33
app/components/Modal/Modal.tsx
Normal file
33
app/components/Modal/Modal.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user