mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 11:25:06 +03:00
* SheetProvider in studio * mobile global nav * view sub navigation * fix ProjectLayout conditional * Account mobile layout * width * hide * layout * overflow * responsive button * overflow * fix mobile nav if IS_PLATFORM * refactor * hide if no content * show command menu item on mobile * ui-patterns sheet provider * use client * show if productMenu * show if productMenu * drag to close * drag to close * 16px input fontsize on inputs to avoid zoom on mobile * offscreen test element * offscreen test element * offscreen test element * update test * update test * update test * pb * test? * test * test * test * spec-click-target * remove console * remove unused import * add dependency to sheet content * close sheet on router.asPath change * remove provider and use simple Sheet * update sidebar mobile * align labels * avoid input zoom on mobile * remove yo
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import { PropsWithChildren } from 'react'
|
|
import { cn } from 'ui'
|
|
|
|
export const ICON_SIZE = 20
|
|
export const ICON_STROKE_WIDTH = 1.5
|
|
|
|
interface Props {
|
|
title?: string
|
|
handleMobileMenu: Function
|
|
}
|
|
|
|
const MobileViewNav = ({ title, handleMobileMenu }: PropsWithChildren<Props>) => {
|
|
return (
|
|
<nav
|
|
className={cn(
|
|
'group px-4 z-10 w-full h-10',
|
|
'border-b border-default',
|
|
'transition-width duration-200',
|
|
'flex md:hidden flex-row items-center gap-1 overflow-x-auto'
|
|
)}
|
|
>
|
|
<button
|
|
title="Menu dropdown button"
|
|
className={cn(
|
|
'group/view-toggle flex justify-center flex-col border-none space-x-0 items-start gap-1 !bg-transparent rounded-md min-w-[30px] w-[30px] h-[30px]'
|
|
)}
|
|
onClick={() => handleMobileMenu()}
|
|
>
|
|
<div className="h-px inline-block left-0 w-4 transition-all ease-out bg-foreground-lighter group-hover/view-toggle:bg-foreground p-0 m-0" />
|
|
<div className="h-px inline-block left-0 w-3 transition-all ease-out bg-foreground-lighter group-hover/view-toggle:bg-foreground p-0 m-0" />
|
|
</button>
|
|
<div className="flex items-center">
|
|
<h4 className="text-base">{title}</h4>
|
|
</div>
|
|
</nav>
|
|
)
|
|
}
|
|
|
|
export default MobileViewNav
|