Commit 4a626801 by Alex Khomenko Committed by GitHub

Grafana-UI: Add story and mdx file (#27152)

parent f7950491
import { Meta, Story, Preview, Props } from '@storybook/addon-docs/blocks';
import { AlphaNotice } from './AlphaNotice';
<Meta title="MDX|AlphaNotice" component={AlphaNotice} />
# AlphaNotice
Used to indicate plugin state - Alpha, Beta or Deprecated.
<Props of={AlphaNotice}/>
import React from 'react';
import { PluginState } from '@grafana/data';
import { AlphaNotice } from './AlphaNotice';
import { withCenteredStory, withHorizontallyCenteredStory } from '../../utils/storybook/withCenteredStory';
import mdx from './AlphaNotice.mdx';
export default {
title: 'Overlays/AlphaNotice',
component: AlphaNotice,
decorators: [withCenteredStory, withHorizontallyCenteredStory],
parameters: {
docs: {
page: mdx,
},
},
};
export const basic = () => {
return <AlphaNotice state={PluginState.alpha} text="This is an alpha feature" />;
};
......@@ -4,7 +4,7 @@ import { ThemeContext } from '../../index';
import { PluginState } from '@grafana/data';
import { Icon } from '../Icon/Icon';
interface Props {
export interface Props {
state?: PluginState;
text?: string;
className?: string;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment