Skip to content

Instantly share code, notes, and snippets.

@mistadikay
Created March 10, 2016 06:19
Show Gist options
  • Save mistadikay/a6cedde2c64fda6b4f81 to your computer and use it in GitHub Desktop.
Save mistadikay/a6cedde2c64fda6b4f81 to your computer and use it in GitHub Desktop.
import React from 'react';
import Modal from 'react-modal2';
import { stringify as b } from 'rebem-classname';
const block = 'popup';
class Popup extends React.Component {
render() {
return (
<Modal
backdropClassName={b({ block, elem: 'overlay' })}
modalClassName={b({ block, mods: { visible: this.props.visible } })}>
{this.props.children}
</Modal>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment