Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): horizontal overflow in preview on mobile devices #36

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions apps/docs/src/components/PreviewComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,20 @@ export const PreviewComponent = forwardRef<PreviewComponentType, PreviewComponen
<Tabs.Content className={cn("rounded-lg", theme)} value="preview">
<div
ref={previewRef}
className={cn(
"preview not-prose dark:bg-wg-gray-950 relative flex min-h-[300px] w-full items-center justify-center rounded-lg border border-surface-100 bg-background p-10 text-sm text-foreground shadow-wg-xs",
{
className="preview not-prose dark:bg-wg-gray-950 relative flex w-full items-center justify-center rounded-lg border border-surface-100 bg-background text-sm text-foreground shadow-wg-xs"
>
<div
className={cn("flex min-h-[300px] w-full items-center overflow-x-auto p-10", {
"items-center": align === "center",
"items-start": align === "start",
"items-end": align === "end",
}
)}
>
<div className="block w-full text-center">
<Suspense fallback={<SuspenseFallback />}>
<Preview />
</Suspense>
})}
>
<div className="mx-auto block w-full min-w-fit text-center">
<Suspense fallback={<SuspenseFallback />}>
<Preview />
</Suspense>
</div>
</div>

<Button
Expand Down