How to use the @storybook/react.action function in @storybook/react

To help you get started, we’ve selected a few @storybook/react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github salesforce / design-system-react / components / menu-dropdown / __docs__ / storybook-stories.jsx View on Github external
handleClose (...params) {
		action('Force Closed')(...params);
		this.setState({ forcedState: false });
	},
github ealush / butter-toast / stories / index.js View on Github external
function raise(e, options = {}) {
    e.preventDefault();

    const toast = CinnamonSugar.crunch({
        title: rand(['WOW!', 'Awesome!', 'Whoopsie', 'Error']),
        message: rand(quotes),
        theme: rand(['red', 'blue', 'purple', 'orange', 'green', 'grey']),
        icon: rand(icons),
        onClick: action('clickity')
    });

    ButterToast.raise(toast, options);
}
github stipsan / uikit-react / src / stories / Modal.js View on Github external
handleClick = () => {
    action('handleCancel')()
    this.props.handleClose()
  }
  render() {
github hongymagic / react-number-input / stories / index.js View on Github external
.add('with min (-1000) max (1000) constraint', () => (
    
  ))
  .add('with events', () => (