Skip to content

Specifically style elements inside MDX - Qwik #2313

Answered by wooorm
thejackshelton asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!

Most likely, you don’t need providers. You can pass components:

import Content from './some/mdx/file.mdx'

const components = {
  h1: H1
};

<Content components={components} />

This is at the framework level, where frameworks are things like React/Preact/Vue/etc.

If the term framework here means alternatives to Next.js, something will load MDX files for you.
There is likely a place where you can integrate between importing those and calling those:

const components = {
  h1: H1
};

export default function Page(Content) => {
  return <Content components={components} />
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ChristianMurphy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants