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

Add ability to change element type #3

Closed
th3fallen opened this issue Apr 13, 2017 · 14 comments
Closed

Add ability to change element type #3

th3fallen opened this issue Apr 13, 2017 · 14 comments

Comments

@th3fallen
Copy link
Contributor

By default you add a span but that causes issues with bootstrap v4 would be nice if we had the option to change it to say a div or something of the sorts...

@th3fallen
Copy link
Contributor Author

or the ability to add classes to the span wrapper would work as well

@nitin42
Copy link
Owner

nitin42 commented Apr 13, 2017

I am experimenting on this. It won't be appropriate to add classes to the wrapper (using styled-components keyframes)

@nitin42
Copy link
Owner

nitin42 commented Apr 13, 2017

Haven't tried this with Bootstrap v4. Are you sure that it causes issues ?

@nitin42
Copy link
Owner

nitin42 commented Apr 13, 2017

How about if we enclose it like this ?

<div>
  <Bounce>
    <p>Hello</p>
  </Bounce>
</div>

@th3fallen
Copy link
Contributor Author

It causes issues with notices particularly (only place i've used them thus far... but here's with it being inline-block'd vs block'd

inline block
http://th3fallen.d.pr/ygX2

block
http://th3fallen.d.pr/bFre

I had to wrap it in a div with a class so i could target the span and force it to display block

@th3fallen
Copy link
Contributor Author

even if we couldnt add custom classes to it, a class to identify it would be super handy for this. atm there's no way to target that span without wrapping it.

@nitin42
Copy link
Owner

nitin42 commented Apr 13, 2017

Ok. So what you are saying is that HOC should render the props.children inside a <div> wrapper instead of span which causes the display to be inline. Right ?

@nitin42
Copy link
Owner

nitin42 commented Apr 13, 2017

That may target the children nodes to display block.

<div {...this.state.styles}>
  {this.props.children}
</div>

@th3fallen
Copy link
Contributor Author

th3fallen commented Apr 13, 2017

yes that would solve it but may cause backwards compat issues for other users of the lib which is why i was originally asking for the option to change it with a prop could be as simple as

<Bounce block>
    <p>Hello</p>
  </Bounce>

which would then render a div vs a span

@nitin42
Copy link
Owner

nitin42 commented Apr 13, 2017

I think this would be better. Thanks !

@th3fallen
Copy link
Contributor Author

anytime! thanks for the library, saves me so much pain, just wish i handled components transitioning out. :(

@nitin42
Copy link
Owner

nitin42 commented Apr 13, 2017

May be I would land the transitioning soon 😄 .

@nitin42
Copy link
Owner

nitin42 commented Apr 15, 2017

Added support for rendering an animation component with prop block. Check it out and let me know. Also check the docs.

@nitin42 nitin42 closed this as completed Apr 17, 2017
@nitin42
Copy link
Owner

nitin42 commented Jun 12, 2017

Does react-motion tries to solve Component Transitioning ? I've never used it before. Seems a little complex and full of abstraction.

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

2 participants