import type { LucideIcon } from 'lucide-react' import type { ReactNode } from 'react' import { cn } from 'ui' import { ShimmeringLoader } from 'ui-patterns/ShimmeringLoader' import { DocsButton } from '@/components/ui/DocsButton' import { ResourceList } from '@/components/ui/Resource/ResourceList' export interface AddonRowProps { icon: LucideIcon title: string description: string docsUrl: string isEnabled: boolean /** Short state shown on the right (e.g. "Enabled", "Small", "2 active"). Hidden while loading. */ status?: string /** Secondary text under the status (e.g. price). When multiple lines are passed, the first is emphasized. */ detail?: string | readonly string[] action: ReactNode isLoading?: boolean isError?: boolean } const AddonDetail = ({ detail }: { detail: string | readonly string[] }) => { const lines = typeof detail === 'string' ? [detail] : detail if (lines.length === 0) return null const [firstLine, ...otherLines] = lines return (
{description}