ant-design-icons
ant-design-icons copied to clipboard
Add `attachTo` to IconContext?
Would it be possible to add an optional attachTo
property to IconContext
, that gets passed through to updateCSS
when you call useInsertStyles
? The updateCSS
function already supports this.
The use case is that I'd like to include an icon within a Web Component's shadow DOM. I want the style sheet to be inserted inside the shadow DOM, instead of the document head, so it only affects the component.
So it would ideally support ShadowRoot
elements as well as other Element
types.
+1
willing to accept a PR?
related: https://github.com/ant-design/ant-design/issues/38911
@noru Did you find a workaround other than manually copy/past the styles inside the shadow?