-
Notifications
You must be signed in to change notification settings - Fork 23
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
Cant set attributes #68
Comments
@emattias to pass class name, you may try {{yield
(hash
Foo=(component (element "span") class="truncate")
)
}} Other attributes can't be passed in and it's not limitation of this addon but rather a limitation of Ember.js at this point of time, see for more info emberjs/rfcs#497 |
component helper seems to be adding |
I do this in ember-primitives this way: const Span = <template>
{{#let (element 'span') as |el|}}
<el class="truncate" ...attributes>
{{yield}}
</el>
{{/let}}
</template>;
<template>
{{yield (hash
Foo=Span
)}}
</template> Gonna close because this is more a general composition thing that only really got more ergonomically possible with gjs. |
I wanted to
yield
aspan
from a general component and set some classes and maybe other attributes on the span for consumers of the general component. Something like this:But its explicitly not allowed. How come? And could it be changed to be allowed?
The text was updated successfully, but these errors were encountered: