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 for types number for addon knobs #1001

Merged
merged 3 commits into from
May 9, 2017

Conversation

marcfallows
Copy link
Contributor

Issue: number did not have the correct types to allow for passing options in typescript.

What I did

I added the types, and updated the typescript example (which wasn't using number).

How to test

Typescript does not complain about packages/addon-knobs/example/typescript/index.tsx. If you only use the first commit you'll see it breakhttps://github.com/marcfallows/storybook/commit/07ddee747e839f0e93ffc010a479d94bc9b6c9c5 and then it is fixed on marcfallows@378acbc.

@@ -25,7 +25,9 @@ stories.add('with all knobs', () => {
const dob = date('DOB', new Date('January 20 1887'));

const bold = boolean('Bold', false);
const color = color('Color', 'black');
const selectedColor = color('Color', 'black');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is changed because TS should complain about block scoping when trying to override color. Updated to use a different name (which lines up with the storybook example).

@codecov
Copy link

codecov bot commented May 8, 2017

Codecov Report

Merging #1001 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1001   +/-   ##
=======================================
  Coverage   12.61%   12.61%           
=======================================
  Files         192      192           
  Lines        4424     4424           
  Branches      707      707           
=======================================
  Hits          558      558           
  Misses       3241     3241           
  Partials      625      625

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 119d634...7620861. Read the comment docs.

@ndelangen ndelangen merged commit 7910ae6 into storybookjs:master May 9, 2017
@ndelangen
Copy link
Member

Thank you for this @marcfallows !

Maybe you can help us get even more typescript support?

@shilman shilman added the misc label May 27, 2017
@ndelangen ndelangen added the bug label May 27, 2017
@ndelangen ndelangen changed the title Fixes for types for knobs number Fix for types number for addon knobs May 27, 2017
Copy link

nx-cloud bot commented Jul 11, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 7620861. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

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

Successfully merging this pull request may close these issues.

3 participants