Props spread in from external package aren't documenting
See original GitHub issueCurrent behavior
I have a core component library that I publish to npm, and then extend those core components in a Nuxt project that I am building out. To do that I import each core component from node_modules into my project base components, and spread the core component props in, in order to keep the props in sync. Example:
<template>
<zr-button class="base-button" v-bind="$props">
<slot></slot>
<base-icon v-if="icon"
class="btn-icon"
:icon="icon">
</base-icon>
</zr-button>
</template>
<script>
import ZrButton from '@zaneray/vue-components/components/base/ZrButton.vue';
/**
* Button component that leverages the Zaneray BaseButton documented at https://zr-vue.netlify.com/#/Base%20Components/ZrButton
*/
export default {
name: "BaseButton",
components: {
ZrButton
},
props: {
...ZrButton.props,
/**
* Icon to display in the button.
*/
icon: {
type: String
}
}
}
</script>
This BaseButton component documentation then renders as so:

…where the icon prop is documented, but the props spread in from ZrButton are not documented.
The spread props are properly available for use on on the BaseButton component, even though they are not documented.
I am using the latest version of Vue Styleguidist: 4.1.1
To reproduce In a Vue component that is documented with VSG, import another Vue component from a library like https://www.npmjs.com/package/@zaneray/vue-components . Spread the props of the imported component into the props of the component you are documenting, and see that the spread props do not make it through to the documentation
Expected behavior I would expect that the props spread in from the imported component are documented in VSG just like normal props would be.
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (15 by maintainers)

Top Related StackOverflow Question
If you do not mind, though, I will create anoter request to be able to prarse vuetify export format.
Ahah, I’ll look at this