The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/packages/grafana-ui/src/components/Menu/Menu.story.internal.tsx

70 lines
1.2 KiB

import React from 'react';
import { Story } from '@storybook/react';
import { Menu, MenuProps } from './Menu';
import { GraphContextMenuHeader } from '..';
export default {
title: 'General/Menu',
component: Menu,
argTypes: {
items: { control: { disable: true } },
header: { control: { disable: true } },
},
parameters: {
knobs: {
disabled: true,
},
controls: {
disabled: true,
},
actions: {
disabled: true,
},
},
};
export const Simple: Story<MenuProps> = (args) => (
<div>
<Menu {...args} />
</div>
);
Simple.args = {
items: [
{
label: 'Group 1',
items: [
{
label: 'Menu item 1',
icon: 'history',
},
{
label: 'Menu item 2',
icon: 'filter',
},
],
},
{
label: 'Group 2',
items: [
{
label: 'Menu item 1',
},
{
label: 'Menu item 2',
},
],
},
],
header: (
<GraphContextMenuHeader
timestamp="2020-11-25 19:04:25"
seriesColor="#00ff00"
displayName="A-series"
displayValue={{
text: '128',
suffix: 'km/h',
}}
/>
),
};