open-vault/ui/stories/selectable-card.stories.js
Angel Garbarino 793ad94d08
Add Core Usage Metrics Components to Storybook (#8401)
* add core usage metrics components to storybook, rename component from small to simple

* remove const from js file

* remove grid container knob from selectable-card
2020-03-02 10:12:34 -07:00

28 lines
879 B
JavaScript

import hbs from 'htmlbars-inline-precompile';
import { storiesOf } from '@storybook/ember';
import { withKnobs, boolean, number, text } from '@storybook/addon-knobs';
import notes from './selectable-card.md';
const CARD_TITLE = 'Tokens';
const SUB_TEXT = 'Total';
const TOTAL_HTTP_REQUESTS = 100;
storiesOf('SelectableCard/SelectableCard', module)
.addParameters({ options: { showPanel: true } })
.addDecorator(withKnobs())
.add(
`SelectableCard`,
() => ({
template: hbs`
<h5 class="title is-5">Selectable Card</h5>
<SelectableCard @cardTitle={{cardTitle}} @total={{totalHttpRequests}} @subText={{subText}} />
`,
context: {
cardTitle: text('cardTitle', CARD_TITLE),
totalHttpRequests: number('totalHttpRequests', TOTAL_HTTP_REQUESTS),
subText: text('subText', SUB_TEXT),
},
}),
{ notes }
);