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 am using @storybook/react v7, and I am having a problem to render the documentation of my component in the Docs. I am coming from version 5 where I used to document my components with md files. Due to the deprecation of some libraries, I felt the need to update the version of storybook, so first of all I updated to version 6, where I could still use md files in the Docs tabs. When I am trying to make the same in version 7, I found that in this version I have to use mdx files instead md for Docs, the problem lies that I want to show the content of my markdown file in the Docs. This is what Docs displays when I run the project, what I need is to display the content of my markdown file between the text Accordion and the component rendered.
And these are my md file, mdx file and the story file where I am trying to insert the content of mdx file in the Docs
Markdown file (AccordionMD.md)
# Accordion Component
The Accordion component is a customizable React component that allows you to create collapsible sections of content. It provides a button to toggle the visibility of the content within the accordion.
```javascript
import Accordion from 'carelinx-ui/dist/accordion/Accordion';
Usage
Once you have imported the Accordion component, you can use it in your JSX code as follows:
Please, can you help me to overcome this issue. I have already read the documentation and I haven't found something which can help me to solve this problem. Maybe I have read something wrong or I misunderstood some of things which changed during the migration from v6 to v7, anyway I would appreciate your support and thank you in advance.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the problem
Hi,
I am using @storybook/react v7, and I am having a problem to render the documentation of my component in the Docs. I am coming from version 5 where I used to document my components with md files. Due to the deprecation of some libraries, I felt the need to update the version of storybook, so first of all I updated to version 6, where I could still use md files in the Docs tabs. When I am trying to make the same in version 7, I found that in this version I have to use mdx files instead md for Docs, the problem lies that I want to show the content of my markdown file in the Docs. This is what Docs displays when I run the project, what I need is to display the content of my markdown file between the text Accordion and the component rendered.
This is my package.json
This is my main.js file
module.exports = {
stories: [
'../stories/.stories.js',
'../src/**/.stories.js'
],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-docs',
'@storybook/addon-a11y'
],
framework: {
name: '@storybook/react-webpack5',
options: {}
},
features: {
storyStoreV7: true
},
docs: {
autodocs: true
}
};
And these are my md file, mdx file and the story file where I am trying to insert the content of mdx file in the Docs
Markdown file (AccordionMD.md)
Usage
Once you have imported the Accordion component, you can use it in your JSX code as follows:
Props
The Accordion component accepts the following props:
title
(string, required): A string representing the title of the accordion.children
(node, required): Content to be displayed within the accordion when it is open.variant
(string): A string indicating the style of the accordion button. Possible values areprimary
(default) andsecondary
.tile
(string): A string to be displayed as a small tile next to the accordion title. It can be used to show additional information or icons.className
(string): Additional CSS class to apply to the accordion container.isOpen
(bool, required): Indicates whether to expand or not the accordion initially.setIsOpen
(function, required): Function that will be triggered when the accordion expands or collapses.MDX file (AccordionMDX.mdx)
Story file (accordion.stories.js)
Please, can you help me to overcome this issue. I have already read the documentation and I haven't found something which can help me to solve this problem. Maybe I have read something wrong or I misunderstood some of things which changed during the migration from v6 to v7, anyway I would appreciate your support and thank you in advance.
Additional context
No response
The text was updated successfully, but these errors were encountered: