import { defineComponent, PropType, } from 'vue'; import { ComponentDoc } from 'vue-docgen-api'; import './ComponentDocs.scss'; export default defineComponent({ name: 'ComponentDocs', props: { docs: { type: (null as unknown) as PropType, required: true, }, }, setup(props) { const docs = props.docs; return () =>

{docs.exportName}

Component <{docs.displayName} />

{docs.description}

Props

{...(docs.props || []).map(prop =>

{prop.name}

{prop.description}

{prop.type ?

Type: {prop.type.name}

: null} {prop.defaultValue ?

Default: {prop.defaultValue.value}

: null}
)}
; }, });