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

UI: Fix proptype for isToolshown #7405

Merged

Conversation

curiouslychase
Copy link
Contributor

isToolshown is a bool in all other proptype definitions and having it as a string causes a warning in the Layout.

Issue:

What I did

  • changed the PropType for isToolshown from string to bool

How to test

Before:

  • ran Storybook
  • opened Chrome console
  • observed the following:
Warning: Failed prop type: Invalid prop `options.isToolshown` of type `boolean` supplied to `Layout`, expected `string`.

After:

  • ran Storybook
  • opened Chrome console
  • observed no warning.
rg 'isToolshown.*PropTypes' ui
ui/src/components/layout/mobile.js
207:    isToolshown: PropTypes.bool,

ui/src/components/layout/container.js
552:    isToolshown: PropTypes.string.isRequired,

ui/src/components/preview/preview.js
335:    isToolshown: PropTypes.bool,

ui/src/components/layout/desktop.js
66:    isToolshown: PropTypes.bool.isRequired,

isToolshown is a bool in all other proptype definitions and having it as a string breaks the Layout.
@vercel
Copy link

vercel bot commented Jul 12, 2019

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

Latest deployment for this branch: https://monorepo-git-fork-chaseadamsio-forks-fixtoolshownp-12e787.storybook.now.sh

@ndelangen ndelangen merged commit 7fe7894 into storybookjs:next Jul 13, 2019
@shilman shilman changed the title Fix proptype for isToolshown UI: Fix proptype for isToolshown Jul 13, 2019
@shilman shilman added this to the 5.2.0 milestone Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants