diff --git a/packages/grafana-ui/src/components/Forms/InlineLabel.story.tsx b/packages/grafana-ui/src/components/Forms/InlineLabel.story.tsx index 23b1b9b4c07..56b855936bf 100644 --- a/packages/grafana-ui/src/components/Forms/InlineLabel.story.tsx +++ b/packages/grafana-ui/src/components/Forms/InlineLabel.story.tsx @@ -1,7 +1,7 @@ import { ComponentMeta } from '@storybook/react'; import React from 'react'; -import { InlineLabel } from './InlineLabel'; +import { InlineLabel, Props } from './InlineLabel'; import mdx from './InlineLabel.mdx'; const meta: ComponentMeta = { @@ -11,19 +11,44 @@ const meta: ComponentMeta = { docs: { page: mdx, }, + controls: { + exclude: ['as'], + }, + }, + argTypes: { + children: { + control: 'text', + }, + tooltip: { + control: 'text', + }, + width: { + control: 'text', + }, }, }; -export const basic = () => { - return Simple label; +export const Basic = (args: Props) => ; + +Basic.args = { + children: 'Simple text', + width: 'auto', + tooltip: undefined, + transparent: false, + interactive: false, }; -export const withTooltip = () => { - return ( - - Simple label - - ); +Basic.parameters = { + controls: { + exclude: ['as', 'tooltip', 'interactive'], + }, +}; + +export const WithTooltip = (args: Props) => ; + +WithTooltip.args = { + ...Basic.args, + tooltip: 'Info text', }; export default meta;