mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Grafana-UI: Add story and mdx file (#27152)
This commit is contained in:
parent
f7950491a3
commit
4a6268014a
@ -0,0 +1,10 @@
|
||||
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}/>
|
@ -0,0 +1,20 @@
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user