-
-
Notifications
You must be signed in to change notification settings - Fork 406
Open
Description
Based on https://mobile.twitter.com/knownasilya/status/1152293795901464577
With the addition of ...attributes, element modifiers and having multiple top elements in a glimmer component, it has become obvious that ...attributes is too limited (I'm sure the API was mean't to be simple while patterns emerge). Think of a component that wraps an input and a label into a nice package. Currently you'd need to either have the user yield out subcomponents and recreate the same structure or provide custom arguments for each element/component.
What if we could expose elements/components for customization by name, for example:
<UserCard
@user={{@user}}
{{on 'click' this.openProfile}}
[avatar
class='avatar-sm'
@size='small'
{{on 'click' this.openAvatarModal}}
]
/>And the user card would apply it like so:
<div ...attributes class='container'>
<Avatar @img={{@user.avatar.url}} ...[avatar] class='avatar' />
{{! more stuff here }}
</div>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels