mirror of
https://github.com/grafana/grafana.git
synced 2024-11-24 09:50:29 -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 { LoadingPlaceholder } from './LoadingPlaceholder';
|
||||
import { LoadingPlaceholder, LoadingPlaceholderProps } from './LoadingPlaceholder';
|
||||
import mdx from './LoadingPlaceholder.mdx';
|
||||
|
||||
const meta: ComponentMeta<typeof LoadingPlaceholder> = {
|
||||
@ -15,10 +15,19 @@ const meta: ComponentMeta<typeof LoadingPlaceholder> = {
|
||||
page: mdx,
|
||||
},
|
||||
},
|
||||
argTypes: {
|
||||
text: {
|
||||
control: { type: 'text' },
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const basic: ComponentStory<typeof LoadingPlaceholder> = () => {
|
||||
return <LoadingPlaceholder text="Loading..." />;
|
||||
export const Basic: ComponentStory<typeof LoadingPlaceholder> = (args: LoadingPlaceholderProps) => {
|
||||
return <LoadingPlaceholder {...args} />;
|
||||
};
|
||||
|
||||
Basic.args = {
|
||||
text: 'Loading...',
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
Loading…
Reference in New Issue
Block a user