mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-11 00:06:25 +08:00
33 lines
714 B
Plaintext
33 lines
714 B
Plaintext
```ts
|
|
// Histogram.stories.ts
|
|
|
|
import type { Meta, StoryObj } from '@storybook/svelte';
|
|
|
|
import Histogram from './Histogram.svelte';
|
|
|
|
const meta: Meta<typeof Histogram> = {
|
|
component: Histogram,
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
/*
|
|
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
|
|
* See https://storybook.js.org/docs/api/csf
|
|
* to learn how to use render functions.
|
|
*/
|
|
export const Default: Story = {
|
|
render: (args) => ({
|
|
Component: Histogram,
|
|
props: args,
|
|
}),
|
|
args: {
|
|
dataType: 'latency',
|
|
showHistogramLabels: true,
|
|
histogramAccentColor: '#1EA7FD',
|
|
label: 'Latency distribution',
|
|
},
|
|
};
|
|
```
|