You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a documentation template I'm using to power all of components in my library but I'm not sure how to get the actual component name or any arbitrary properties into the template outside of a React component. Ideally I'd like to be able to reference something like toString(<Title />) if such a thing is even possible.
import {
Title,
Subtitle,
Description,
Primary,
ArgsTable,
Stories,
PRIMARY_STORY,
} from "@storybook/addon-docs/blocks";
# <Title />
<Description />
## Importing 📦
<!-- I want to insert <Title /> here -->
I'm also wondering if it's possible to assign arbitrary values within the parameters and pass it to my doc template to effect.
For instance:
exportdefault{title: "Button",parameters: {docs: {isWebComponent: true,description: {component: 'Renders a button'},}}};
And then within my markdown template use isWebComponent: true/false to change the import statement rendering. This would allow my documentation to be dynamic enough and handle a degree of use cases.
Is something like this possible? Any help would be appreciated 🙏🏻
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a documentation template I'm using to power all of components in my library but I'm not sure how to get the actual component name or any arbitrary properties into the template outside of a React component. Ideally I'd like to be able to reference something like
toString(<Title />)
if such a thing is even possible.I'm also wondering if it's possible to assign arbitrary values within the parameters and pass it to my doc template to effect.
For instance:
And then within my markdown template use
isWebComponent: true/false
to change the import statement rendering. This would allow my documentation to be dynamic enough and handle a degree of use cases.Is something like this possible? Any help would be appreciated 🙏🏻
Beta Was this translation helpful? Give feedback.
All reactions