Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix expectation of props being passed to components #87

Merged
merged 1 commit into from
Sep 21, 2021
Merged

Conversation

wooorm
Copy link
Owner

@wooorm wooorm commented Sep 21, 2021

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.

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.
@wooorm wooorm merged commit 9f759a4 into main Sep 21, 2021
@wooorm wooorm deleted the component-scope branch September 21, 2021 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local components are overridden with erronous ones
1 participant