mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Storybook: Add controls to LoadingPlaceholder
story (#54939)
This commit is contained in:
parent
76f0037654
commit
6b2ff6f25b
@ -3,7 +3,7 @@ import React from 'react';
|
|||||||
|
|
||||||
import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
|
import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
|
||||||
|
|
||||||
import { LoadingPlaceholder } from './LoadingPlaceholder';
|
import { LoadingPlaceholder, LoadingPlaceholderProps } from './LoadingPlaceholder';
|
||||||
import mdx from './LoadingPlaceholder.mdx';
|
import mdx from './LoadingPlaceholder.mdx';
|
||||||
|
|
||||||
const meta: ComponentMeta<typeof LoadingPlaceholder> = {
|
const meta: ComponentMeta<typeof LoadingPlaceholder> = {
|
||||||
@ -15,10 +15,19 @@ const meta: ComponentMeta<typeof LoadingPlaceholder> = {
|
|||||||
page: mdx,
|
page: mdx,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
argTypes: {
|
||||||
|
text: {
|
||||||
|
control: { type: 'text' },
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const basic: ComponentStory<typeof LoadingPlaceholder> = () => {
|
export const Basic: ComponentStory<typeof LoadingPlaceholder> = (args: LoadingPlaceholderProps) => {
|
||||||
return <LoadingPlaceholder text="Loading..." />;
|
return <LoadingPlaceholder {...args} />;
|
||||||
|
};
|
||||||
|
|
||||||
|
Basic.args = {
|
||||||
|
text: 'Loading...',
|
||||||
};
|
};
|
||||||
|
|
||||||
export default meta;
|
export default meta;
|
||||||
|
Loading…
Reference in New Issue
Block a user