From 814f194d0784420ae1953ee38d85e33fe207af24 Mon Sep 17 00:00:00 2001 From: Uchechukwu Obasi Date: Tue, 23 Mar 2021 12:30:13 +0100 Subject: [PATCH] Form Legend: updates story from knobs to controls (#32250) --- .../src/components/Forms/Legend.story.tsx | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/packages/grafana-ui/src/components/Forms/Legend.story.tsx b/packages/grafana-ui/src/components/Forms/Legend.story.tsx index 9f6b8c3035a..c140fe40e05 100644 --- a/packages/grafana-ui/src/components/Forms/Legend.story.tsx +++ b/packages/grafana-ui/src/components/Forms/Legend.story.tsx @@ -1,14 +1,9 @@ import React from 'react'; -import { text } from '@storybook/addon-knobs'; +import { Story } from '@storybook/react'; import { Legend } from '@grafana/ui'; import mdx from './Legend.mdx'; - -const getKnobs = () => { - return { - label: text('text', 'Form section'), - }; -}; +import { NOOP_CONTROL } from '../../utils/storybook/noopControl'; export default { title: 'Forms/Legend', @@ -17,11 +12,19 @@ export default { docs: { page: mdx, }, + knobs: { + disable: true, + }, + }, + argTypes: { + children: { name: 'Label' }, + description: NOOP_CONTROL, }, }; -export const basic = () => { - const { label } = getKnobs(); - - return {label}; +export const Basic: Story = (args) => { + return {args.children}; +}; +Basic.args = { + children: 'Form section', };