Skip to content

Commit e8d4b6d

Browse files
authored
fix: prevent mdx docs from wrapping jsx text in p tags (#22162)
1 parent 19a1247 commit e8d4b6d

4 files changed

Lines changed: 28 additions & 24 deletions

File tree

packages/react/src/components/Button/Button.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ an element appear as a button control to a screen reader. Check out the
287287

288288
<Unstyled>
289289
<Button as="div" role="button">
290-
a11y Button
290+
{'a11y Button'}
291291
</Button>
292292
</Unstyled>
293293

packages/react/src/components/ClassPrefix/ClassPrefix.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export default function MyApp() {
6565
To _get_ the prefix, use
6666

6767
<LinkTo title="Hooks/usePrefix" name="Overview">
68-
usePrefix
68+
{'usePrefix'}
6969
</LinkTo>
7070

7171
## Component API

packages/react/src/components/ComposedModal/ComposedModal.mdx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,15 @@ const ModalStateManager = ({
125125
title="Warning"
126126
className="sb-notification">
127127
<CodeSnippet type="inline" hideCopyButton>
128-
Modal
128+
{'Modal'}
129129
</CodeSnippet>
130-
and
130+
{' and '}
131131
<CodeSnippet type="inline" hideCopyButton>
132-
ComposedModal
132+
{'ComposedModal'}
133133
</CodeSnippet>
134-
have to be put at the top level in a React tree. The easiest way to ensure
135-
that is using a React portal, as shown in the example above.
134+
{
135+
' have to be put at the top level in a React tree. The easiest way to ensure that is using a React portal, as shown in the example above.'
136+
}
136137
</InlineNotification>
137138
</Unstyled>
138139

@@ -259,16 +260,17 @@ With `<ComposedModal>`, you can control the buttons with the following code.
259260
kind="warning"
260261
title="Warning"
261262
className="sb-notification">
262-
As the instructions for the three buttons imply,
263+
{'As the instructions for the three buttons imply, '}
263264
<CodeSnippet type="inline" hideCopyButton>
264-
ModalFooter
265+
{'ModalFooter'}
265266
</CodeSnippet>
266-
is flexible with the buttons you render using
267+
{' is flexible with the buttons you render using '}
267268
<CodeSnippet type="inline" hideCopyButton>
268-
Button
269+
{'Button'}
269270
</CodeSnippet>
270-
components. In this case, your application code is responsible for handling
271-
button actions, such as closing the modal.
271+
{
272+
' components. In this case, your application code is responsible for handling button actions, such as closing the modal.'
273+
}
272274
</InlineNotification>
273275
</Unstyled>
274276

packages/react/src/components/Modal/Modal.mdx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,15 @@ const ModalStateManager = ({
128128
title="Warning"
129129
className="sb-notification">
130130
<CodeSnippet type="inline" hideCopyButton>
131-
Modal
131+
{'Modal'}
132132
</CodeSnippet>
133-
and
133+
{' and '}
134134
<CodeSnippet type="inline" hideCopyButton>
135-
ComposedModal
135+
{'ComposedModal'}
136136
</CodeSnippet>
137-
have to be put at the top level in a React tree. The easiest way to ensure
138-
that is using a React portal, as shown in the example above.
137+
{
138+
' have to be put at the top level in a React tree. The easiest way to ensure that is using a React portal, as shown in the example above.'
139+
}
139140
</InlineNotification>
140141
</Unstyled>
141142

@@ -262,16 +263,17 @@ With `<ComposedModal>`, you can control the buttons with the following code.
262263
kind="warning"
263264
title="Warning"
264265
className="sb-notification">
265-
As the instructions for the three buttons imply,
266+
{'As the instructions for the three buttons imply, '}
266267
<CodeSnippet type="inline" hideCopyButton>
267-
ModalFooter
268+
{'ModalFooter'}
268269
</CodeSnippet>
269-
is flexible with the buttons you render using
270+
{' is flexible with the buttons you render using '}
270271
<CodeSnippet type="inline" hideCopyButton>
271-
Button
272+
{'Button'}
272273
</CodeSnippet>
273-
components. In this case, your application code is responsible for handling
274-
button actions, such as closing the modal.
274+
{
275+
' components. In this case, your application code is responsible for handling button actions, such as closing the modal.'
276+
}
275277
</InlineNotification>
276278
</Unstyled>
277279

0 commit comments

Comments
 (0)