Override html tags used in mdx file #2561
-
I have an mdx file that looks roughly like this:
In my nextjs app, I'd like to override the look of the This is a simplified version of the mdx processing code:
In the rendered html I can see the custom H2 component being rendered, but no custom component for the dd tag. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi Gabriele! Don’t. You can write This is how JSX works: some things are components, some things are not components. I’d really recommend using that here too. For in-depth info on this, see the documentation: https://mdxjs.com/docs/using-mdx/. |
Beta Was this translation helpful? Give feedback.
Hi Gabriele!
Don’t.
You can write
Dl
instead ofdl
,Dt
instead ofdt
.Dd
instead ofdd
.Or, even use more descriptive names:
DefinitionList
,DefinitionTitle
,DefinitionData
.Maybe even prefix your custom components:
definition.list
,definition.title
,definition.data
.This is how JSX works: some things are components, some things are not components. I’d really recommend using that here too.
For in-depth info on this, see the documentation: https://mdxjs.com/docs/using-mdx/.