From 7104d90b394ed0e501c472abd04724cdf0edc3ad Mon Sep 17 00:00:00 2001 From: Tima Gixe <60817786+timagixe@users.noreply.github.com> Date: Fri, 9 Sep 2022 15:23:50 +0300 Subject: [PATCH] Storybook: Add controls to `FieldSet` story (#54964) --- .../src/components/Forms/FieldSet.story.tsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/packages/grafana-ui/src/components/Forms/FieldSet.story.tsx b/packages/grafana-ui/src/components/Forms/FieldSet.story.tsx index e054fed345a..a5b5a9b4ccb 100644 --- a/packages/grafana-ui/src/components/Forms/FieldSet.story.tsx +++ b/packages/grafana-ui/src/components/Forms/FieldSet.story.tsx @@ -1,4 +1,4 @@ -import { ComponentMeta } from '@storybook/react'; +import { ComponentMeta, ComponentStory } from '@storybook/react'; import React from 'react'; import { Input, Form, FieldSet, Field } from '@grafana/ui'; @@ -6,34 +6,41 @@ import { Input, Form, FieldSet, Field } from '@grafana/ui'; import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; import { Button } from '../Button'; +import { Props } from './FieldSet'; import mdx from './FieldSet.mdx'; const meta: ComponentMeta = { title: 'Forms/FieldSet', component: FieldSet, decorators: [withCenteredStory], + args: { + label: 'Default label', + }, parameters: { docs: { page: mdx, }, + controls: { + exclude: ['children'], + }, + }, + argTypes: { + label: { control: 'text' }, }, }; -export const basic = () => { +export const Basic: ComponentStory = (args: Props) => { return (
console.log('Submit')}> {() => ( <> -
+
-
- -