Skip to content

Commit

Permalink
💄 style: fix plugin iframe width (#721)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx authored Dec 19, 2023
1 parent 3f7ce1d commit 53ad132
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const IFrameRender = memo<IFrameRenderProps>(({ url, width = 800, height = 300,

return (
<>
{loading && <Skeleton active style={{ width }} />}
{loading && <Skeleton active style={{ maxWidth: '100%', width }} />}
<iframe
// @ts-ignore
allowtransparency="true"
Expand All @@ -51,6 +51,7 @@ const IFrameRender = memo<IFrameRenderProps>(({ url, width = 800, height = 300,
// iframe 在 color-scheme:dark 模式下无法透明
// refs: https://www.jianshu.com/p/bc5a37bb6a7b
colorScheme: 'light',
maxWidth: '100%',
}}
width={width}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const IFrameRender = memo<IFrameRenderProps>(({ url, id, payload, width = 600, h

return (
<>
{loading && <Skeleton active style={{ width }} />}
{loading && <Skeleton active style={{ maxWidth: '100%', width }} />}
<iframe
// @ts-ignore
allowtransparency="true"
Expand All @@ -136,6 +136,7 @@ const IFrameRender = memo<IFrameRenderProps>(({ url, id, payload, width = 600, h
// iframe 在 color-scheme:dark 模式下无法透明
// refs: https://www.jianshu.com/p/bc5a37bb6a7b
colorScheme: 'light',
maxWidth: '100%',
}}
width={width}
/>
Expand Down

0 comments on commit 53ad132

Please sign in to comment.