import { VscSymbolProperty } from '@react-icons/all-files/vsc/VscSymbolProperty'; import { ChevronDown, ChevronUp, Code2, LinkIcon } from 'lucide-react'; import Link from 'next/link'; import { Fragment } from 'react'; import { ENV } from '@/util/env'; import { Badges } from './Badges'; import { DeprecatedNode } from './DeprecatedNode'; import { ExcerptNode } from './ExcerptNode'; import { InheritedFromNode } from './InheritedFromNode'; import { SeeNode } from './SeeNode'; import { SummaryNode } from './SummaryNode'; import { UnstableNode } from './UnstableNode'; import { Collapsible, CollapsibleContent, CollapsibleTrigger } from './ui/Collapsible'; export async function PropertyNode({ node, packageName, version, }: { readonly node: any; readonly packageName: string; readonly version: string; }) { return (

Properties

{node.map((property: any, idx: number) => (

{property.displayName} {property.isOptional ? '?' : ''} : {' '} {property.summary?.defaultValueBlock.length ? `= ${property.summary.defaultValueBlock.reduce( (acc: string, def: { kind: string; text: string }) => `${acc}${def.text}`, '', )}` : ''}

{property.summary?.deprecatedBlock.length ? ( ) : null} {property.summary?.unstableBlock?.length ? ( ) : null} {property.summary?.summarySection.length ? ( ) : null} {property.inheritedFrom ? ( ) : null} {property.summary?.seeBlocks.length ? ( ) : null}
))}
); }