Replies: 3 comments 3 replies
-
Are you sure, DEVs will never use this component somewhere else than within our web-components? <my-angular-vue-or-react-component>
<post-closebutton></post-closebutton>
</my-angular-vue-or-react-component>
<my-vue-component>
<post-closebutton slot="my-custom-slot"></post-closebutton>
</my-vue-component> If none of the above examples would throw an error, I would be fine with your solution. |
Beta Was this translation helpful? Give feedback.
-
Decision: After the insight that components with a slot attribute no longer get slotted into the default slot if their named slot does not exist (take Maybe in the future it might be an idea to check up the DOM tree if a named slot for a specific component exists and only then write the slot attribute on the component. |
Beta Was this translation helpful? Give feedback.
-
Documented in #4183 |
Beta Was this translation helpful? Give feedback.
-
Some components make little sense on their own but can be reused in a couple of places. One example for this would be the close button.
Proposal
Adding the component name as the slot attribute on the component would be neat in this case because other components that are expecting a close button to be defined somewhere can use this slot to correctly place the close button.
Button:
Menu:
Beta Was this translation helpful? Give feedback.
All reactions