Skip to content

Commit

Permalink
readability
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank99 committed Mar 26, 2024
1 parent 402833c commit 314da76
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/itwinui-react/src/core/utils/components/ShadowRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ const ClientShadowRoot = ({
const templateRef = React.useRef<HTMLTemplateElement>(null);
const shadowRoot = useShadowRoot(templateRef, { css });

// fallback to <style> tag if adoptedStyleSheets is not supported
const fallbackCss =
!supportsAdoptedStylesheets && css ? <style>{css}</style> : null;

return shadowRoot ? (
ReactDOM.createPortal(
<>
{
/* fallback to <style> tag if adoptedStyleSheets is not supported */
!supportsAdoptedStylesheets && css ? <style>{css}</style> : null
}

{fallbackCss}
{children}
</>,
shadowRoot,
Expand Down

0 comments on commit 314da76

Please sign in to comment.