From 6b2ff6f25b665d53b0f3738d1ec483f1fa8a231d Mon Sep 17 00:00:00 2001 From: Tima Gixe <60817786+timagixe@users.noreply.github.com> Date: Fri, 9 Sep 2022 13:35:41 +0300 Subject: [PATCH] Storybook: Add controls to `LoadingPlaceholder` story (#54939) --- .../LoadingPlaceholder.story.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/grafana-ui/src/components/LoadingPlaceholder/LoadingPlaceholder.story.tsx b/packages/grafana-ui/src/components/LoadingPlaceholder/LoadingPlaceholder.story.tsx index 07e50480a99..ed6b036653f 100644 --- a/packages/grafana-ui/src/components/LoadingPlaceholder/LoadingPlaceholder.story.tsx +++ b/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 = { @@ -15,10 +15,19 @@ const meta: ComponentMeta = { page: mdx, }, }, + argTypes: { + text: { + control: { type: 'text' }, + }, + }, }; -export const basic: ComponentStory = () => { - return ; +export const Basic: ComponentStory = (args: LoadingPlaceholderProps) => { + return ; +}; + +Basic.args = { + text: 'Loading...', }; export default meta;