mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 04:45:08 +03:00
- move navigation components to `apps/studio/components/layouts/Navigation` - add [FloatingMobileToolbar](https://github.com/supabase/supabase/pull/43444/changes#diff-3dffe47fd51ca851d612d8728e03b2dc344ec213d4f3a46a824d3fa32a7cc851) as quick access to tools such as search, assistant, inline editor, etc - behind feature flag and feature preview (true by default as it's a bit annoying to have to enable it all the time as previews are stored in local-storage) - fix sidebar panels closing on viewport resizing (regression from previous pr) https://github.com/user-attachments/assets/d6881e3b-5128-4306-bb82-3ca39c755dba <img width="986" height="697" alt="Screenshot 2026-03-12 at 12 40 11" src="https://github.com/user-attachments/assets/da8511e2-7d01-4237-b814-596031c747c5" />
45 lines
1.4 KiB
TypeScript
45 lines
1.4 KiB
TypeScript
import { Fragment } from 'react'
|
|
|
|
interface BreadcrumbsViewProps {
|
|
defaultValue: any
|
|
}
|
|
|
|
export const BreadcrumbsView = ({ defaultValue: breadcrumbs }: BreadcrumbsViewProps) => {
|
|
return (
|
|
<>
|
|
{breadcrumbs?.length
|
|
? breadcrumbs.map((breadcrumb: any, i: number) => (
|
|
<Fragment key={breadcrumb.key}>
|
|
{i > 0 && (
|
|
<span className="text-border-stronger dark:text-border-strong">
|
|
<svg
|
|
viewBox="0 0 24 24"
|
|
width="16"
|
|
height="16"
|
|
stroke="currentColor"
|
|
strokeWidth="1"
|
|
strokeLinecap="round"
|
|
strokeLinejoin="round"
|
|
fill="none"
|
|
shapeRendering="geometricPrecision"
|
|
>
|
|
<path d="M16 3.549L7.12 20.600"></path>
|
|
</svg>
|
|
</span>
|
|
)}
|
|
|
|
<a
|
|
onClick={breadcrumb.onClick || (() => {})}
|
|
className={`text-gray-1100 block px-2 py-1 text-xs leading-5 focus:bg-gray-100 focus:text-gray-900 focus:outline-none ${
|
|
breadcrumb.onClick ? 'cursor-pointer hover:text-white' : ''
|
|
}`}
|
|
>
|
|
{breadcrumb.label}
|
|
</a>
|
|
</Fragment>
|
|
))
|
|
: null}
|
|
</>
|
|
)
|
|
}
|