Files
supabase/apps/studio/components/layouts/ProjectLayout/ProductMenuBar.tsx
T
Francesco Sansalvadore 0035920bf1 feat: studio mobile nav (#31080)
* 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
2024-12-16 10:49:17 -04:00

32 lines
800 B
TypeScript

import { PropsWithChildren } from 'react'
interface ProductMenuBarProps {
title: string
}
const ProductMenuBar = ({ title, children }: PropsWithChildren<ProductMenuBarProps>) => {
return (
<div
/**
* id used in playwright-tests/tests/snapshot/spec/table-editor.spec.ts
* */
id="spec-click-target"
className={[
'hide-scrollbar flex flex-col w-full h-full', // Layout
'bg-dash-sidebar',
'border-default ',
].join(' ')}
>
<div
className="border-default flex max-h-12 items-center border-b px-6"
style={{ minHeight: '3rem' }}
>
<h4 className="text-lg">{title}</h4>
</div>
<div className="flex-grow overflow-y-auto">{children}</div>
</div>
)
}
export default ProductMenuBar