mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
27 lines
605 B
Plaintext
27 lines
605 B
Plaintext
```js
|
|
// Histogram.stories.js|jsx
|
|
|
|
/** @jsx h */
|
|
import { h } from 'preact';
|
|
|
|
import { Histogram } from './Histogram';
|
|
|
|
export default {
|
|
/* 👇 The title prop is optional.
|
|
* See https://storybook.js.org/docs/preact/configure/overview#configure-story-loading
|
|
* to learn how to generate automatic titles
|
|
*/
|
|
title: 'Histogram',
|
|
component: Histogram,
|
|
};
|
|
|
|
const Template = (args) => <Histogram {...args} />;
|
|
|
|
export const Default = Template.bind({});
|
|
Default.args = {
|
|
dataType: 'latency',
|
|
showHistogramLabels: true,
|
|
histogramAccentColor: '#1EA7FD',
|
|
label: 'Latency distribution',
|
|
};
|
|
``` |