Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Replace contentShorthand with itemShorthand #504

Closed
bmdalex opened this issue Nov 20, 2018 · 1 comment
Closed

Replace contentShorthand with itemShorthand #504

bmdalex opened this issue Nov 20, 2018 · 1 comment
Labels
vsts Paired with ticket in vsts

Comments

@bmdalex
Copy link
Collaborator

bmdalex commented Nov 20, 2018

Replace contentShorthand with itemShorthand

Steps

We have a bug in our components propTypes for the content slot. Most of our components use the Slot component to generate their content slot, meaning that the propTypes for content prop should be:

Expected Result

content: customPropTypes.itemShorthand

Actual Result

content: customPropTypes.contentShorthand

Solution

  • go to all components and verify their propTypes for the slots are correct;
  • for all component slots created with Slot component, replace customPropTypes.contentShorthand propType for that slot with customPropTypes.itemShorthand
  • check in docs examples that warnings such as the one below don't appear anymore (for instance when providing an object as a slot value):
<Button content={{ content: "Click here" }} />

will generate the following warning:
screenshot 2018-11-20 at 16 59 50

@bmdalex
Copy link
Collaborator Author

bmdalex commented Dec 13, 2018

fixed by #528

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
vsts Paired with ticket in vsts
Projects
None yet
Development

No branches or pull requests

3 participants