-
Notifications
You must be signed in to change notification settings - Fork 34
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
Update Transition
component to allow to be renderless
#179
Comments
hey 👋 |
I raised a similar point in this PR with code examples of how the Ember invocation differs the official docs: #129 (comment) I feel like someone needs to decide if we are mirroring the official implementation or not. 🧐 |
I think we should mirror the output and behavior, but not necessarily the implementation. There are a ton of anti patterns in the react implementation, for example. That said, we don't need a div in a component, but then what do you animate? The implementation i think would be best would be for Transition to yield a modifier that you can then place on the element you want to animate. That way it's clear what is being animated. |
@NullVoxPopuli oh, I like the idea of it yielding a modifier! I'm not exactly sure how the React implementation works when it doesn't render an element. I'm assuming that it applies the transitions to the child element.
Yeah, but that doesn't work if you try to pass something like an empty string to mimic the React |
I've noticed that the
Transition
component always renders an element (div
by default). There are a lot of Tailwind UI examples that pass a ReactFragment
component toTransition
so it doesn't render anything. Is that possible with Ember? I mainly ask because it's more difficult to implement Tailwind UI code examples with the Ember version since you end up with an extra element in the hierarchy that messes with styling.Here is an example from Tailwind UI for building a select menu:
The text was updated successfully, but these errors were encountered: