Skip to content

Commit 2072b6b

Browse files
GeoBrodasbholmesdev
authored andcommitted
Update README.md (#5179)
Hey there, so recently I was playing around the mdx, and wanted my users to navigate to a specific section in my article using the `id` tags. This was not happening when I was making custom components. When I pass the Astro props like above, the id was automatically getting passed for headings.
1 parent 48425b6 commit 2072b6b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/integrations/mdx/README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,11 @@ will be converted into this HTML:
319319
But what if you want to specify your own markup for these blockquotes? In the above example, you could create a custom `<Blockquote />` component (in any language) that either has a `<slot />` component or accepts a `children` prop.
320320

321321
```astro title="src/components/Blockquote.astro"
322-
<blockquote class="bg-blue-50 p-4">
322+
---
323+
const props = Astro.props;
324+
---
325+
326+
<blockquote {...props} class="bg-blue-50 p-4">
323327
<span class="text-4xl text-blue-600 mb-2">“</span>
324328
<slot />
325329
</blockquote>

0 commit comments

Comments
 (0)