Skip to content

Commit 361b094

Browse files
authored
Merge pull request #3053 from ably/hotfix/fix-examples-rendering
fix: prevent horizontal overflow in vertical layout examples
2 parents 2498163 + d1263e9 commit 361b094

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

src/components/Examples/ExamplesRenderer.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,22 +161,24 @@ const ExamplesRenderer = ({
161161
</div>
162162
<div
163163
className={cn(
164-
'flex flex-col gap-4 max-w-[calc(100vw-64px)]',
164+
'flex flex-col gap-4 max-w-[calc(100vw-64px)] overflow-hidden',
165165
isVerticalLayout && 'md:flex-row',
166166
isLargeLayout && 'md:flex-col',
167167
)}
168168
>
169-
<CodeEditor
170-
theme="light"
171-
editor={{
172-
className: '',
173-
showLineNumbers: true,
174-
}}
175-
/>
169+
<div className={cn('min-w-0 overflow-hidden', isVerticalLayout && 'md:flex-1')}>
170+
<CodeEditor
171+
theme="light"
172+
editor={{
173+
className: '',
174+
showLineNumbers: true,
175+
}}
176+
/>
177+
</div>
176178
<div
177179
className={cn(
178180
'flex gap-4 flex-col sm:flex-row',
179-
isVerticalLayout && 'md:flex-col',
181+
isVerticalLayout && 'md:flex-col md:w-[21.875rem] md:flex-shrink-0',
180182
isLargeLayout && 'md:flex-row md:justify-center md:h-fit md:min-h-[700px] h-[400px]',
181183
)}
182184
>

0 commit comments

Comments
 (0)