react-transitions
react-transitions copied to clipboard
centering children?
Any way to center animated children? Tried with margin: auto on ReactTransistions and parent element, but it does not work...
I found a workaround:
Go to node_modules>react-transitions>dist>index.js and remove or comment out line position: 'absolute',
under childWrapperStyle.
Edit: removing inline-block
helps too.
Edit2: previous workaround causes problems that next page does not 'push' previous away.
Better solution is to add left:0,top:0
to childWrapperStyle
and to _react2.default.createElement(..)
(around 90th line)
Would you show some snippets so that I could try to help out? On the demo page there is a text block, a "Hi, there" string, being centered. Giving a look at its source may help.
Feel free to let me know how it works out!