import { defineComponent } from 'vue'; import { ComponentDoc } from 'vue-docgen-api'; import { DeclarationReflection } from 'typedoc'; import ComponentDocs from './ComponentDocs'; import TSDocs from './TSDocs'; import './Package.scss'; export default defineComponent({ name: 'Package', props: { name: { type: String, required: true, }, }, setup(props) { const packageName = props.name; const docs = getByName(getShortPackageName(Array.isArray(packageName) ? packageName[0] : packageName)); if (!docs) { return () =>
Unknown package name {packageName}
; } const { lib, components } = docs; return () =>

{lib.name}

{lib.comment}

{lib.flags}

{...(lib.children || []).map((child:DeclarationReflection) => { const componentDocs = components.find((c: ComponentDoc) => c.exportName === child.name); if (componentDocs) { return } return })}
; }, });