Skip to content

Conversation

@mxstbr
Copy link
Contributor

@mxstbr mxstbr commented Jan 23, 2019

Closes #378

@vercel
Copy link

vercel bot commented Jan 23, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Copy link
Member

@johno johno left a comment

Choose a reason for hiding this comment

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

This is great thanks @mxstbr 🙏.

Had one quick comment we'll need to address, though I don't really have an opinion on whether we remove the spread syntax or polyfill buble (for the runtime).

${layout ? `Layout={this.layout} layoutProps={props}` : ''}
${
layout
? `Layout={this.layout} layoutProps={{ ...layoutProps, ...props }}`
Copy link
Member

Choose a reason for hiding this comment

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

I think we might need to tweak this to use Object.assign or configure buble to polyfill:

Suggested change
? `Layout={this.layout} layoutProps={{ ...layoutProps, ...props }}`
? `Layout={this.layout} layoutProps={Object.assign(layoutProps, props)}`

Copy link
Member

@johno johno left a comment

Choose a reason for hiding this comment

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

💟

@johno johno merged commit 3bbef4d into mdx-js:master Jan 24, 2019
@balupton
Copy link

Is this functionality documented anywhere? As the PR isn't that clear on how to make use of it.

johno pushed a commit that referenced this pull request Feb 18, 2019
* Pass exports to Layout

Closes #378

* Use Object.assign
@silvenon
Copy link
Contributor

@balupton I don't think so, I opened a new issue for this. #418 I'll document it next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants