Storybook: Add controls to `LoadingPlaceholder` story (#54939)

pull/54964/head
Tima Gixe 3 years ago committed by GitHub
parent 76f0037654
commit 6b2ff6f25b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      packages/grafana-ui/src/components/LoadingPlaceholder/LoadingPlaceholder.story.tsx

@ -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> = (args: LoadingPlaceholderProps) => {
return <LoadingPlaceholder {...args} />;
};
export const basic: ComponentStory<typeof LoadingPlaceholder> = () => {
return <LoadingPlaceholder text="Loading..." />;
Basic.args = {
text: 'Loading...',
};
export default meta;

Loading…
Cancel
Save