feat(website): render @defaultValue blocks (#8527)

feat(website): render @defaultValue blocks
This commit is contained in:
Suneet Tipirneni
2022-08-19 12:24:55 -04:00
committed by GitHub
parent 47f2990b89
commit 8028813825
5 changed files with 30 additions and 24 deletions

View File

@@ -40,6 +40,10 @@ export function DeprecatedBlock({ children }: { children: ReactNode }): JSX.Elem
);
}
export function DefaultValueBlock({ children }: { children: ReactNode }): JSX.Element {
return <Block title="Default value">{children}</Block>;
}
export function RemarksBlock({ children }: { children: ReactNode }): JSX.Element {
return <Block title="Remarks">{children}</Block>;
}
@@ -52,6 +56,8 @@ export function BlockComment({ children, tagName, index }: BlockCommentProps): J
return <DeprecatedBlock>{children}</DeprecatedBlock>;
case StandardTags.remarks.tagNameWithUpperCase:
return <RemarksBlock>{children}</RemarksBlock>;
case StandardTags.defaultValue.tagNameWithUpperCase:
return <DefaultValueBlock>{children}</DefaultValueBlock>;
case StandardTags.typeParam.tagNameWithUpperCase:
case StandardTags.param.tagNameWithUpperCase:
return <Text>{children}</Text>;