File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
typescript-sdk/apps/dojo/src/components Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
2
import { ViewerConfig } from "@/types/feature" ;
3
3
import { cn } from "@/lib/utils" ;
4
+ import { useMobileView } from "@/utils/use-mobile-view" ;
4
5
5
6
interface ViewerLayoutProps extends ViewerConfig {
6
7
className ?: string ;
@@ -14,12 +15,12 @@ export function ViewerLayout({
14
15
className,
15
16
children,
16
17
} : ViewerLayoutProps ) {
17
- // return (
18
- //
19
- // );
18
+ const { isMobile } = useMobileView ( ) ;
20
19
21
20
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
+ } ) } >
23
24
< div className = "flex flex-1 overflow-hidden z-1" >
24
25
< main className = "flex-1 overflow-auto" >
25
26
< div className = "h-full" > { children } </ div >
Original file line number Diff line number Diff line change @@ -102,8 +102,8 @@ export function Sidebar({ isMobile, onMobileClose }: SidebarProps) {
102
102
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`
103
103
104
104
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 ' }
107
107
` } >
108
108
{ /* Sidebar Header */ }
109
109
< div className = "p-4 border-b" >
You can’t perform that action at this time.
0 commit comments