Storybook: Button control type

Created on 13 Aug 2020  路  3Comments  路  Source: storybookjs/storybook

With the Knobs addon I could include a button and associated handler... is this possible with the Controls addon?

import { button } from '@storybook/addon-knobs';

const label = 'Do Something';
const handler = () => doSomething('foobar');
const groupId = 'GROUP-ID1';

button(label, handler, groupId);
P1 controls feature request todo

Most helpful comment

Not currently possible, adding it as a feature request

All 3 comments

Not currently possible, adding it as a feature request

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

I'll throw my two cents in that buttons are critical for us鈥攚e'll have to keep using knobs unless buttons are added to controls as well.

Was this page helpful?
0 / 5 - 0 ratings