atomicojs / hooks

utility kit for use with Atomico

Home Page:https://atomico.gitbook.io/doc/atomico/atomico-hooks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

useSlot should use `assignedNodes` instead of `assignedElements`

efoken opened this issue · comments

To find also text-only Nodes which are passed in <slot />, the useSlot hook should use assignedNodes(). Otherwise we only get passed HTML elements.

So it would be similar to the React children prop.

Hi, sorry for not answering earlier, if you are right and I have updated this hook to use the assignedNodes method in version 3.11

https://webcomponents.dev/edit/RjrShAkF1NYMkBbyNOaP/src/index.jsx