|
I can't figure out how to pass along the children from the consumer into my custom component. Does anyone know how to do this? consumer: my custom element: |
Answered by
onx2
Apr 20, 2024
Replies: 2 comments
0 replies
Answer selected by
onx2
|
I think the expected way to do this is to use a customElement(
"wb-button",
{ variant: "one" },
(props: WbButtonProps) => {
return <button><slot /></button>;
}
);This works for me, but moreover, it works when Solid context providers are in use, while Solid context providers do not work with the |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


I think I figured this out though I don't find it very ergonomic so if anyone has a better approach, I would love to hear it.