react-modal
react-modal copied to clipboard
Add overlay/content example
Added an example I used to animate modal content in and apply an opacity transition to the overlay. If this is interesting I can look into adding to the /examples as well.
Acceptance Checklist:
- [x] The commit message follows the guidelines in
CONTRIBUTING.md. - [n/a] Documentation (README.md) and examples have been updated as needed.
- [n/a] If this is a code change, a spec testing the functionality has been added.
- [n/a] If the commit message has [changed] or [removed], there is an upgrade path above.
LEGIT. Obrigado, @arist0tl3!
The style is the "default style" that we use on the examples, right?
@diasbruno
I think I understand what you were getting at -- just updated the example to use the default styles and note that transform will need to be removed in order for this example to work properly.
Great. Is there a bug on the styles of the examples?
No, but if I try to do this:
.ReactModal__Content {
transform: translate(-50%, 150%);
transition: transform 800ms ease-in-out;
}
.ReactModal__Content--after-open {
transform: translate(-50%, -50%);
}
.ReactModal__Content--before-close {
transform: translate(-50%, 150%);
}
the inline style will take precedence. It felt better to suggest removing that inline style and define it instead as a css rule vs keeping it as is and adding !important to the rules above.
Took a stab at wording it; lmk if it does/doesn't make sense lol
Everything looks good. Thanks so much for taking the time to help with the docs. Grande Lavoro. :tada: Grazie mille.