import {APIMember} from '@sanity/tsdoc' import {Code} from '@sanity/ui' import {useTextSize} from '../../lib/ui' import {ClassContent} from './ClassContent' import {FunctionContent} from './FunctionContent' import {InterfaceContent} from './InterfaceContent' import {NamespaceContent} from './NamespaceContent' import {TypeAliasContent} from './TypeAliasContent' import {VariableContent} from './VariableContent' export function ReferenceContent(props: {data: APIMember}): React.ReactNode { const {data} = props const textSize = useTextSize([1, 1, 2]) if (data._type === 'api.class') { return } if (data._type === 'api.function') { return } if (data._type === 'api.interface') { return } if (data._type === 'api.namespace') { return } if (data._type === 'api.typeAlias') { return } if (data._type === 'api.variable') { return } return ( {JSON.stringify(data, null, 2)} ) }