diff options
author | 2022-10-24 23:52:34 +0530 | |
---|---|---|
committer | 2022-10-24 14:22:34 -0400 | |
commit | 61f7e16491e97d0e396dfe25647d945d765fbb77 (patch) | |
tree | dd3c299a44b8ad8a25b890326df7d3c4718216e0 | |
parent | ca94e9ccc14b6934a78f4b92ddd7ed8dc3b26560 (diff) | |
download | astro-61f7e16491e97d0e396dfe25647d945d765fbb77.tar.gz astro-61f7e16491e97d0e396dfe25647d945d765fbb77.tar.zst astro-61f7e16491e97d0e396dfe25647d945d765fbb77.zip |
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.
-rw-r--r-- | packages/integrations/mdx/README.md | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/integrations/mdx/README.md b/packages/integrations/mdx/README.md index 57acc5c8c..0f287b44b 100644 --- a/packages/integrations/mdx/README.md +++ b/packages/integrations/mdx/README.md @@ -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> |