storybook/docs/snippets/vue/histogram-story.mdx-2.mdx
2022-11-17 16:33:22 +01:00

32 lines
789 B
Plaintext

```md
<!-- Histogram.stories.mdx -->
import { Canvas, Meta, Story } from '@storybook/addon-docs';
import Histogram from './Histogram.vue';
<Meta title="Histogram" component={Histogram} />
<!--
👇 Render functions are a framework specific feature to allow you control on how the component renders.
See https://storybook.js.org/docs/7.0/vue/api/csf
to learn how to use render functions.
-->
<Canvas>
<Story
name="Default"
args={{
dataType: 'latency',
showHistogramLabels: true,
histogramAccentColor: '#1EA7FD',
label: 'Latency distribution',
}}
render={(args, { argTypes }) => ({
components: { Histogram },
props: Object.keys(argTypes),
template: `<Histogram v-bind="$props" v-on="$props" />`,
})} />
</Canvas>
```