Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(docsite): render single-paragraph MarkdownText as semantic <p> (#3170)

Durvesh Pilankar79b3696770fa
diff --git a/apps/docsite/src/components/MarkdownText.tsx b/apps/docsite/src/components/MarkdownText.tsx
index 3aaf56f94e..dcb872ab5f 100644
--- a/apps/docsite/src/components/MarkdownText.tsx
+++ b/apps/docsite/src/components/MarkdownText.tsx
@@ -14,7 +14,6 @@ interface MarkdownTextProps {
type?: TextProps['type'];
color?: TextProps['color'];
weight?: TextProps['weight'];
- display?: TextProps['display'];
style?: TextProps['style'];
}
@@ -23,7 +22,6 @@ export function MarkdownText({
type = 'body',
color,
weight,
- display,
style,
}: MarkdownTextProps) {
const paragraphs = splitMarkdownParagraphs(children);
@@ -35,10 +33,11 @@ export function MarkdownText({
if (paragraphs.length === 1) {
return (
<Text
+ as="p"
type={type}
color={color}
weight={weight}
- display={display}
+ display="block"
style={style}>
<Markdown display="inline">{paragraphs[0]}</Markdown>
</Text>