adobe / react-webcomponent

This projects automates the wrapping of a React component in a CustomElement.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Only inline styles are supported?

AndreyLuzinov opened this issue · comments

AFAIU this solution will work with shadow-dom only in case of inline styles?

I think it should be an optional parameter to pass styles or link ref into webcomponent while creation.

Hi @AndreyLuzinov. Currently we support only rendering the component in the shadow root. So if you want to add styles only inline styles on the element will work.

You are right, we don't support yet <style/> or a link ref, for that we need to pass extra parameters here https://github.com/adobe/react-webcomponent/blob/master/lib/WebComponent.js#L142.

Could you please open a separate issue detailing the problem more formally, and we can discuss what the best solution would be.