Files
supabase/apps/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPanel/HelpSection.tsx
Francesco Sansalvadore 9145470ff6 feat(studio): mobile sheet nav (#43184)
- use `MobileSheetNav` for all `LayoutSidebar` panels on mobile viewport
- move `Help` to LayoutSidepanel for a more cohesive experience
- enables opening the help panel using params `?sidebar=help-panel`

https://github.com/user-attachments/assets/a84e56f0-f2e2-4217-89a2-ba895bb7d352
2026-02-27 12:06:27 +00:00

48 lines
1.4 KiB
TypeScript

import type { SupportFormUrlKeys } from 'components/interfaces/Support/SupportForm.utils'
import { cn } from 'ui'
import { HelpOptionsList } from './HelpOptionsList'
import type { HelpOptionId } from './HelpPanel.constants'
type HelpSectionProps = {
excludeIds?: HelpOptionId[]
isPlatform: boolean
projectRef: string | undefined
supportLinkQueryParams: Partial<SupportFormUrlKeys> | undefined
onAssistantClick?: () => void
onSupportClick?: () => void
className?: string
}
export const HelpSection = ({
excludeIds = [],
isPlatform,
projectRef,
supportLinkQueryParams,
onAssistantClick,
onSupportClick,
className,
}: HelpSectionProps) => {
const description = projectRef
? 'Start with our Assistant, docs, or community.'
: 'Start with our docs or community.'
return (
<div className={cn('flex flex-col gap-4', className)}>
<div className="flex flex-col gap-0.5">
<h5 className="text-foreground">Need help with your project?</h5>
<p className="text-xs text-foreground-lighter text-balance">{description}</p>
</div>
<HelpOptionsList
excludeIds={excludeIds}
isPlatform={isPlatform}
projectRef={projectRef}
supportLinkQueryParams={supportLinkQueryParams}
onAssistantClick={onAssistantClick}
onSupportClick={onSupportClick}
size="tiny"
/>
</div>
)
}