Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply class to ReactModal__Overlay and ReactModal__Content with className (BEM style) #14

Closed
coderberry opened this issue Nov 17, 2014 · 2 comments

Comments

@coderberry
Copy link
Contributor

We need to be able to add a class to the overlay portion of the css.. for example:

<Modal className="foo">...</Modal>

should render as:

<div class="ReactModal__Overlay ReactModal__Overlay--foo">
  <div class="ReactModal__Content ReactModal__Content--foo">
    ...
   </div>
</iv>
@mzabriskie
Copy link
Member

@cavneb your use case is now supported, with a slight change:

<Modal className="myContentClass" overlayClassName="myOverlayClass"/>

Will result in:

<div class="ReactModal__Overlay myOverlayClass">
  <div class="ReactModal__Content myContentClass">
    ...
   </div>
</div>

@glifchits
Copy link

could we support a style prop for inline CSS in JS? I'm talking about:

var modalStyles = {
   left: 80,
   right: 80
};

return <Modal style={modalStyles} />;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants