Skip to content

Commit 0d4818a

Browse files
committed
fix: bootstrap styles are not available in the overlay
1 parent 1245cde commit 0d4818a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libs/engine/src/custom-elements/dapplet-overlay.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { createPortal } from 'react-dom'
33
import styled from 'styled-components'
44
import { useViewport } from '../app/contexts/viewport-context'
55
import { ShadowDomWrapper } from '../app/components/shadow-dom-wrapper'
6+
import { useMutableWeb } from '../app/contexts/mutable-web-context'
67

78
const ModalBackdrop = styled.div`
89
background: #ffffff88;
@@ -25,12 +26,13 @@ export interface OverlayProps {
2526
}
2627

2728
export const Overlay: React.FC<OverlayProps> = ({ children }) => {
29+
const { engine } = useMutableWeb()
2830
const { viewportRef } = useViewport()
2931

3032
if (!viewportRef.current) return null
3133

3234
return createPortal(
33-
<ShadowDomWrapper className="mweb-overlay">
35+
<ShadowDomWrapper className="mweb-overlay" stylesheetSrc={engine.config.bosElementStyleSrc}>
3436
<ModalBackdrop>{children}</ModalBackdrop>
3537
</ShadowDomWrapper>,
3638
viewportRef.current

0 commit comments

Comments
 (0)