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

Fixes to mobile examples page #340

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion apps/typegpu-docs/src/components/CodeEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function CodeEditor(props: Props) {
enabled: false,
},
}}
className="py-16 md:py-0 bg-tameplum-50"
className="py-16 md:py-0"
/>
);
}
2 changes: 1 addition & 1 deletion apps/typegpu-docs/src/components/ControlPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export function ControlPanel() {
</div>

<h2 className="text-xl font-medium">Example controls</h2>
<div className="grid items-center grid-cols-2 gap-4 overflow-auto p-1">
<div className="grid items-center grid-cols-2 gap-4 overflow-auto p-1 pb-2">
{exampleControlParams.map((param) => paramToControlRow(param))}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/typegpu-docs/src/components/ExampleLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function ExampleLayout() {
</button>
</div>

<div className="flex h-screen p-4 gap-4 bg-tameplum-50">
<div className="flex h-[100dvh] p-4 gap-4 bg-tameplum-50">
{menuShown || menuShownMobile ? <SideMenu /> : null}
<ExamplePage />
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/typegpu-docs/src/components/ExampleView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export function ExampleView({ example, isPlayground = false }: Props) {
</div>

{codeEditorShowing ? (
<div className="absolute z-20 md:relative h-full w-full">
<div className="absolute z-20 md:relative h-[calc(100%-2rem)] w-[calc(100%-2rem)] md:w-full md:h-full">
<div className="absolute inset-0">
<CodeEditor code={code} onCodeChange={handleCodeChange} />
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/typegpu-docs/src/components/design/Snackbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export function Snackbar(props: { text: string }) {

return (
<div
className="absolute bottom-4 right-4 z-10 flex items-center gap-4 w-full max-w-md p-4 text-gray-500 bg-red-100 rounded-lg"
className="absolute bottom-4 right-4 z-40 flex items-center gap-4 w-full max-w-[min(28rem,calc(100vw-2rem))] p-4 text-gray-500 bg-red-100 rounded-lg"
role="alert"
>
<div className="inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-red-500">
Expand Down