HelpSection.tsx38 lines · main
| 1 | import { cn } from 'ui' |
| 2 | |
| 3 | import { HelpOptionsList } from './HelpOptionsList' |
| 4 | import type { HelpOptionId } from './HelpPanel.constants' |
| 5 | import type { SupportFormUrlKeys } from '@/components/interfaces/Support/SupportForm.utils' |
| 6 | |
| 7 | type HelpSectionProps = { |
| 8 | excludeIds?: HelpOptionId[] |
| 9 | isPlatform: boolean |
| 10 | projectRef: string | undefined |
| 11 | supportLinkQueryParams: Partial<SupportFormUrlKeys> | undefined |
| 12 | onAssistantClick?: () => void |
| 13 | onSupportClick?: () => boolean | void |
| 14 | className?: string |
| 15 | } |
| 16 | |
| 17 | export const HelpSection = ({ |
| 18 | excludeIds = [], |
| 19 | isPlatform, |
| 20 | projectRef, |
| 21 | supportLinkQueryParams, |
| 22 | onAssistantClick, |
| 23 | onSupportClick, |
| 24 | className, |
| 25 | }: HelpSectionProps) => { |
| 26 | return ( |
| 27 | <div className={cn('flex flex-col', className)}> |
| 28 | <HelpOptionsList |
| 29 | excludeIds={excludeIds} |
| 30 | isPlatform={isPlatform} |
| 31 | projectRef={projectRef} |
| 32 | supportLinkQueryParams={supportLinkQueryParams} |
| 33 | onAssistantClick={onAssistantClick} |
| 34 | onSupportClick={onSupportClick} |
| 35 | /> |
| 36 | </div> |
| 37 | ) |
| 38 | } |