Skip to content

Commit d3e2664

Browse files
committed
chore: mobile view design tweaks
1 parent 6d0cfab commit d3e2664

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

typescript-sdk/apps/dojo/src/components/layout/viewer-layout.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from "react";
22
import { ViewerConfig } from "@/types/feature";
33
import { cn } from "@/lib/utils";
4+
import { useMobileView } from "@/utils/use-mobile-view";
45

56
interface ViewerLayoutProps extends ViewerConfig {
67
className?: string;
@@ -14,12 +15,12 @@ export function ViewerLayout({
1415
className,
1516
children,
1617
}: ViewerLayoutProps) {
17-
// return (
18-
//
19-
// );
18+
const { isMobile } = useMobileView();
2019

2120
return (
22-
<div className={cn("relative flex h-screen overflow-hidden bg-palette-surface-main p-spacing-2", className)}>
21+
<div className={cn("relative flex h-screen overflow-hidden bg-palette-surface-main", className, {
22+
"p-spacing-2": !isMobile,
23+
})}>
2324
<div className="flex flex-1 overflow-hidden z-1">
2425
<main className="flex-1 overflow-auto">
2526
<div className="h-full">{children}</div>

typescript-sdk/apps/dojo/src/components/sidebar/sidebar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ export function Sidebar({ isMobile, onMobileClose }: SidebarProps) {
102102
const tabClass = `cursor-pointer flex-1 h-8 px-2 text-sm text-primary shadow-none bg-none border-none font-medium gap-1 rounded-lg data-[state=active]:bg-white data-[state=active]:text-primary data-[state=active]:shadow-none`
103103

104104
return (
105-
<div className={`flex flex-col h-full bg-white/50 border-2 overflow-hidden border-palette-border-default
106-
${isMobile ? 'w-80 shadow-xl' : 'w-74 min-w-[296px] flex-shrink-0 rounded-lg'}
105+
<div className={`flex flex-col h-full border-2 border-palette-border-default
106+
${isMobile ? 'w-80 shadow-xl bg-white z-99' : 'bg-white/50 w-74 min-w-[296px] flex-shrink-0 rounded-lg overflow-hidden'}
107107
`}>
108108
{/* Sidebar Header */}
109109
<div className="p-4 border-b">

0 commit comments

Comments
 (0)