Skip to content

Commit

Permalink
Update README.md (#5179)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
GeoBrodas committed Oct 24, 2022
1 parent ca94e9c commit 61f7e16
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/integrations/mdx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,11 @@ will be converted into this HTML:
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.

```astro title="src/components/Blockquote.astro"
<blockquote class="bg-blue-50 p-4">
---
const props = Astro.props;
---
<blockquote {...props} class="bg-blue-50 p-4">
<span class="text-4xl text-blue-600 mb-2">“</span>
<slot />
</blockquote>
Expand Down

0 comments on commit 61f7e16

Please sign in to comment.