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

Knobs panel not displayed #1658

Closed
arthakdoo opened this issue Aug 14, 2017 · 5 comments
Closed

Knobs panel not displayed #1658

arthakdoo opened this issue Aug 14, 2017 · 5 comments

Comments

@arthakdoo
Copy link

arthakdoo commented Aug 14, 2017

I am running a storybook instance and have the component displayed there, but knobs panel is not displayed. The source is very simple:

/* global module */
import React from 'react';
import { storiesOf } from '@storybook/react';
import { withKnobs, select } from '@storybook/addon-knobs';

import PhotoSlider, { ThemePreset, SliderType } from '../../index';

const stories = storiesOf('ThemedPhotoSlider', module);
stories.addDecorator(withKnobs);

const imageUrls = [
	'https://upload.wikimedia.org/wikipedia/commons/2/24/BLA_flag.jpg',
	'http://sw2773.smartweb-static.com/upload_dir/shop/Forside-Sydafrika.jpg',
	'https://hormozgan96.files.wordpress.com/2013/01/bla-flag.png',
];

stories.add('Flags', () =>
	<PhotoSlider
		sourceUrls={imageUrls}
		theme={select('Theme', ThemePreset, ThemePreset.Standard)}
		type={select('Type', SliderType, SliderType.ImagePerRow)}
	/>,
);

No error is shown, console is clear of any messages, it displays the component with the default button text ('Ok'), but knobs panel is not visible anywhere to enable changing the button title.

What's strange, I use storybook at work, and the knobs panel is displayed there, but here on my computer at home, there is no knobs panel. So I know how these are used, I used text, number, boolean, etc. and it all works at work, but what ever I try I don't get the knobs panel here.

Here is a screen shot
https://ibb.co/hOVwcF

@Hypnosphi
Copy link
Member

Hypnosphi commented Aug 14, 2017

How does your .storybook/addons.js file look like?

@arthakdoo
Copy link
Author

arthakdoo commented Aug 15, 2017

It doesn't look. I don't have that file. I was reading through your pages about knobs, but I did not see any mention of that config file. Should you make any documentation about it more visible in relevant places? Now I see 'Using Addons' mentions it, but I didn't use your docs to read chronologically all content, but rather what I needed. I think you should make this more visible when reading e.g. about knobs.

@arthakdoo
Copy link
Author

Jesus, I just saw it on your knobs page as well. Completely my fault, sorry about the fuss. Sorry I did not take it seriously and did not read it thoroughly. Thanks Daniel for help, Closing.

@ibdf
Copy link

ibdf commented Nov 8, 2019

Jesus, I just saw it on your knobs page as well. Completely my fault, sorry about the fuss. Sorry I did not take it seriously and did not read it thoroughly. Thanks Daniel for help, Closing.

2 years later I had the same issue. I didn't see the addon.js part. So this thread was helpful after all. Thanks.

@hrishikeshpotdar91
Copy link

This thread was indeed helpful as i did the exact same thing yesterday while setting up a new storybook repo

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

No branches or pull requests

5 participants