From 5adcfc9867683ab51e3e7df76cff297bb8704511 Mon Sep 17 00:00:00 2001 From: iqbal <111554475+noobcoder6602@users.noreply.github.com> Date: Sat, 8 Jul 2023 15:18:23 +0530 Subject: [PATCH 1/2] issue#22910 fixed ts error No title prop defined: --- code/ui/blocks/src/blocks/Meta.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ui/blocks/src/blocks/Meta.tsx b/code/ui/blocks/src/blocks/Meta.tsx index c651bc06f87f..3c5e10db54ce 100644 --- a/code/ui/blocks/src/blocks/Meta.tsx +++ b/code/ui/blocks/src/blocks/Meta.tsx @@ -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 = ({ of }) => { +export const Meta: FC = ({ of, title }) => { const context = useContext(DocsContext); if (of) { context.referenceMeta(of, true); From 31cfea10347f8e692687a9adecde7d16a0165c26 Mon Sep 17 00:00:00 2001 From: iqbal <111554475+iqbalcodes6602@users.noreply.github.com> Date: Wed, 12 Jul 2023 09:09:27 +0530 Subject: [PATCH 2/2] Update Meta.tsx, removed the destructuring of title --- code/ui/blocks/src/blocks/Meta.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ui/blocks/src/blocks/Meta.tsx b/code/ui/blocks/src/blocks/Meta.tsx index 3c5e10db54ce..a54023160387 100644 --- a/code/ui/blocks/src/blocks/Meta.tsx +++ b/code/ui/blocks/src/blocks/Meta.tsx @@ -11,7 +11,7 @@ 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 = ({ of, title }) => { +export const Meta: FC = ({ of }) => { const context = useContext(DocsContext); if (of) { context.referenceMeta(of, true);