wooorm / xdm

Just a *really* good MDX compiler. No runtime. With esbuild, Rollup, and webpack plugins
http://wooorm.com/xdm/
MIT License
595 stars 18 forks source link

Fix expectation of `props` being passed to components #87

Closed wooorm closed 3 years ago

wooorm commented 3 years ago

Components defined in MDX content should be able to receive arbitrary props. The main MDXContent component, though, receives props.components. Previously their was a mix up where the code did not differentiate between the two. The handling of whether a variable was defined or not (which is needed for the rewrite that allows components being passed in and provided through context) was also too naïve.

This commit fixes that.

Closes GH-53.