mirror of
https://github.com/wassname/talk.git
synced 2026-07-05 11:26:40 +08:00
15 lines
403 B
JavaScript
15 lines
403 B
JavaScript
import React from 'react';
|
|
import { Button, Icon } from 'react-mdl';
|
|
import styles from './Modal.css';
|
|
|
|
export default ({ open, children, onClose }) => (
|
|
<div className={`${styles.container} ${!open ? styles.hide : ''}`}>
|
|
<div className={styles.inner}>
|
|
<Button className={styles.close} onClick={onClose}>
|
|
<Icon name="close" />
|
|
</Button>
|
|
{children}
|
|
</div>
|
|
</div>
|
|
);
|