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
In order to improve developer experience and increase understanding of the usage of the components, we should decorate our components with (jsdoc)[https://jsdoc.app/].
Today Storybook already creates documentation of the comments for each prop, so jsdoc of components should not be in favor of this.
Could we find a clever way of producing jsdoc automatically by converting these comments, e.g. with better-docs?
/**
* Props for the Avatar component.*/
export interface AvatarProps {
/** The name to display in the avatar. */
name: string;
/** The type of avatar. */
type?: AvatarType;
/** The size of the avatar. */
size?: AvatarSize;
/** Additional class names to apply to the avatar. */
className?: string;
/** URL of the image to display in the avatar. */
imageUrl?: string;
/** Alt text for the image. */
imageUrlAlt?: string;
/** Whether to display an outline around the avatar. */
outline?: boolean;
/** Custom label to display inside the avatar. */
customLabel?: string;
}
/**
* Avatar component to display user or company avatars with various customization options.
*/
export const Avatar = ({
could output
* Avatar component to display user or company avatars with various customization options.
*
* @component
* @param {Object} props - The properties for the Avatar component.
* @param {string} props.name - The name to display in the avatar.
* @param {'company' | 'person' | 'custom'} [props.type='person'] - The type of avatar.
* @param {'xs' | 'sm' | 'md' | 'lg' | 'xl'} [props.size='sm'] - The size of the avatar.
* @param {string} [props.className] - Additional class names to apply to the avatar.
* @param {string} [props.imageUrl] - URL of the image to display in the avatar.
* @param {string} [props.imageUrlAlt] - Alt text for the image.
* @param {boolean} [props.outline=false] - Whether to display an outline around the avatar.
* @param {string} [props.customLabel] - Custom label to display inside the avatar.
* @returns {JSX.Element} The Avatar component.
*/
(this jsdoc was generated by kindly asking co-pilot)
The text was updated successfully, but these errors were encountered:
In order to improve developer experience and increase understanding of the usage of the components, we should decorate our components with (jsdoc)[https://jsdoc.app/].
Today Storybook already creates documentation of the comments for each prop, so jsdoc of components should not be in favor of this.
Could we find a clever way of producing jsdoc automatically by converting these comments, e.g. with better-docs?
could output
(this jsdoc was generated by kindly asking co-pilot)
The text was updated successfully, but these errors were encountered: