Skip to content

Instantly share code, notes, and snippets.

@bkeating bkeating/story.js
Created Aug 18, 2017

What would you like to do?
import React from 'react';
import { storiesOf } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import { withKnobs, select, boolean } from '@storybook/addon-knobs';
import RadialBarChart from '../components/RadialBarChart';
// I'd prefer to stick the prop payload elsewhere...
// import { mockVisualization } from './mockdata';
storiesOf('Reports/Visualizations', module)
withInfo('')(() => {
// My prop object payload, with knobs [works]
const mockVisualization = {
id: 519,
type: 'chart',
hide: boolean('Hide XAxis', false),
dataKey: select('XAxis dataKey', { amount: 'Amount', datetime: 'Datetime' }, 'datetime')
return (
<RadialBarChart visualization={mockVisualization} />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.