storybook/docs/snippets/svelte/histogram-story.ts.mdx
2023-11-27 20:57:51 -07:00

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',
},
};
```