Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/ui/blocks/src/blocks/Meta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import type { BaseAnnotations, ModuleExports } from '@storybook/types';
import { Anchor } from './Anchor';
import { DocsContext } from './DocsContext';

type MetaProps = BaseAnnotations & { of?: ModuleExports };
type MetaProps = BaseAnnotations & { of?: ModuleExports; title?: string };

/**
* This component is used to declare component metadata in docs
* and gets transformed into a default export underneath the hood.
*/
export const Meta: FC<MetaProps> = ({ of }) => {
export const Meta: FC<MetaProps> = ({ of, title }) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need to destructure the title out of props here as it's never being used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MWhite-22 thank u for responding. I have updated this please can you consider this PR for merging so that i can get my first PR merged.

const context = useContext(DocsContext);
if (of) {
context.referenceMeta(of, true);
Expand Down