Storybook docs page displays extra JSDOC tags in description
Asked Answered
N

1

7

My component's description on the Storybook Docs page is picking up extra tags stuff from the JSDocs in addition to the description.

How can I go about displaying only the "description part" of the JSDOC description?

I've attempted explicitly specifying a @description tag but that didn't do anything.

enter image description here

Natishanative answered 22/11, 2020 at 15:32 Comment(2)
Hey, did you find a solution?Bottali
any update on this? 2 years and no support? not to throw shade, but it seems like storybook doesn't understand jsdocs is usedDacia
D
0

Use following workaround to get rid of extra jsdoc tag.

/**
 * A simple Button component.
 * <!--
 * @param {Object} props - The props of the Button component.
 * @param {string} props.label - The label of the button.
 * @param {Function} props.onClick - The click event handler of the button.
 * @returns {JSX.Element} The rendered Button component.
 * -->
 */
const Button = ({ label, onClick }) => {
    return (
        <button onClick={onClick}>
            {label}
        </button>
    );
};
Demilune answered 14/6 at 17:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.