I'm trying to create a docs for a small component. To do this I'm using StoryBook with the addon "@storybook/addon-docs", but I can't get the component properties to appear.
My component:
function OverlayList(props) {...}
OverlayList.propTypes = {
/**
* Prop children.....Example 1.
**/
children: PropTypes.element.isRequired,
/**
* Test .... .
*/
options: PropTypes.array,
/**
Test test test
*/
selectedValue: PropTypes.string,
};
OverlayList.defaultProps = {
children: <input></input>,
options: [],
};
export default OverlayList;
src/components/OverlayList/OverlayList.stories.js
import React from 'react';
import OverlayList from './OverlayList';
export default {
title: 'OverlayList',
component: OverlayList,
};
export const overlayList = (args) => {
return <OverlayList {...args} />;
};
.storybook/main.js
module.exports = {
stories: ['../src/components/**/*.stories.[tj]s'],
addons: ['@storybook/addon-docs'],
};
Why I can not see the component props with their descriptions?
The component was not create with "create-react-app", I use webpack.
Thanks you so much for everything.