Skip to content

Commit 073c7a3

Browse files
authored
fix: Drawer gutter with iframe content (#3537)
1 parent 50922ce commit 073c7a3

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

pages/app-layout/utils/external-widget.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import ButtonDropdown from '~components/button-dropdown';
88
import Drawer from '~components/drawer';
99
import awsuiPlugins from '~components/internal/plugins';
1010

11+
import { IframeWrapper } from '../../utils/iframe-wrapper';
1112
import { Counter, CustomDrawerContent } from './content-blocks';
1213

1314
const searchParams = new URL(location.hash.substring(1), location.href).searchParams;
@@ -239,10 +240,15 @@ awsuiPlugins.appLayout.registerDrawer({
239240

240241
mountContent: container => {
241242
ReactDOM.render(
242-
<>
243-
<Counter id="circle3-global" />
244-
global widget content circle 3
245-
</>,
243+
<IframeWrapper
244+
id="circle3-global"
245+
AppComponent={() => (
246+
<>
247+
<Counter id="circle3-global" />
248+
global widget content circle 3
249+
</>
250+
)}
251+
/>,
246252
container
247253
);
248254
},

src/app-layout/visual-refresh-toolbar/drawer/styles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ $drawer-resize-handle-size: awsui.$space-m;
178178
inline-size: $global-drawer-gap-size;
179179
background: awsui.$color-gap-global-drawer;
180180
border-inline-end: awsui.$border-divider-section-width solid awsui.$color-border-layout;
181+
box-sizing: border-box;
181182
}
182183

183184
> .drawer-slider {

0 commit comments

Comments
 (0)