Files
talk/client/coral-ui/components/Drawer.js
T
Wyatt Johnson c2a8a3e4a3 fixed tests
2017-12-21 14:26:44 -07:00

26 lines
663 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import React from 'react';
import cn from 'classnames';
import PropTypes from 'prop-types';
import styles from './Drawer.css';
const Drawer = ({children, onClose, className = ''}) => {
return (
<div className={cn(styles.drawer, className)}>
{/* TODO: Swap out with button */}
<div className={cn(styles.closeButton, [className, 'close-button'].join('-'))} onClick={onClose}>×</div>
<div className={styles.content}>
{children}
</div>
</div>
);
};
Drawer.propTypes = {
active: PropTypes.bool,
onClose: PropTypes.func.isRequired,
children: PropTypes.node,
className: PropTypes.string,
};
export default Drawer;