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

Implement ability to opt out of MDXProvider components #1175

Merged
merged 1 commit into from
Jul 30, 2020

Conversation

johno
Copy link
Member

@johno johno commented Jul 22, 2020

Related to #821

@vercel
Copy link

vercel bot commented Jul 22, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/mdx/mdx/juf9wwyx7
✅ Preview: https://mdx-git-stop-provider-merge.mdx.vercel.app

@johno johno added 💎 v2 Issues related to v2 🗄 area/interface This affects the public interface labels Jul 22, 2020
@johno johno force-pushed the stop-provider-merge branch from dafd031 to 6c4ff30 Compare July 22, 2020 21:51
@vercel vercel bot temporarily deployed to Preview July 22, 2020 21:51 Inactive
@johno johno added the ☂️ area/types This affects typings label Jul 22, 2020
@johno
Copy link
Member Author

johno commented Jul 22, 2020

I believe this change will require a change to types for @mdx-js/react and @mdx-js/preact since the MDXProvider component can now accept useParentContext={false}.

@johno johno force-pushed the stop-provider-merge branch from 6c4ff30 to 86f664a Compare July 22, 2020 22:33
@vercel vercel bot temporarily deployed to Preview July 22, 2020 22:33 Inactive
@johno johno force-pushed the stop-provider-merge branch from 86f664a to a8120d1 Compare July 22, 2020 22:45
@vercel vercel bot temporarily deployed to Preview July 22, 2020 22:45 Inactive
@johno johno force-pushed the stop-provider-merge branch from a8120d1 to 081da76 Compare July 22, 2020 22:58
@vercel vercel bot temporarily deployed to Preview July 22, 2020 22:58 Inactive
@johno johno force-pushed the stop-provider-merge branch from 081da76 to f36f3df Compare July 22, 2020 23:06
@vercel vercel bot temporarily deployed to Preview July 22, 2020 23:06 Inactive
@wooorm
Copy link
Member

wooorm commented Jul 23, 2020

/cc @ChristianMurphy as this is about types too

@ChristianMurphy
Copy link
Member

This is the type for the MDXProvider

/**
* Prop type that includes a component dictionary
*/
interface ComponentsProp {
/**
* Mapping of names for JSX components to React components
*/
components: ComponentDictionary
}

the update would look like

 /** 
  * Prop type that includes a component dictionary 
  */ 
 interface ComponentsProp { 
   /** 
    * Mapping of names for JSX components to React components 
    */ 
   components: ComponentDictionary 

+  /**
+   * description of new property goes here
+   *
+   * @defaultValue true
+   */
+  useParentContext?: boolean
 } 

@johno johno force-pushed the stop-provider-merge branch from f36f3df to d66efb0 Compare July 30, 2020 17:53
@vercel vercel bot temporarily deployed to Preview July 30, 2020 17:53 Inactive
@johno johno force-pushed the stop-provider-merge branch from d66efb0 to 5f51880 Compare July 30, 2020 18:00
@vercel vercel bot temporarily deployed to Preview July 30, 2020 18:00 Inactive
Copy link
Member

@ChristianMurphy ChristianMurphy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✔️
Thanks @johno! 🙇

@johno johno merged commit 9a33ae5 into next Jul 30, 2020
@johno johno deleted the stop-provider-merge branch July 30, 2020 21:44
@johno johno added this to the v2 milestone Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗄 area/interface This affects the public interface ☂️ area/types This affects typings 💎 v2 Issues related to v2
Development

Successfully merging this pull request may close these issues.

3 participants