diff --git a/packages/grafana-ui/src/components/Card/Card.story.tsx b/packages/grafana-ui/src/components/Card/Card.story.tsx index 5a407217dbe..1396506ccb9 100644 --- a/packages/grafana-ui/src/components/Card/Card.story.tsx +++ b/packages/grafana-ui/src/components/Card/Card.story.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { boolean } from '@storybook/addon-knobs'; import { action } from '@storybook/addon-actions'; +import { Story } from '@storybook/react'; import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; -import { Card } from './Card'; +import { Card, Props } from './Card'; import mdx from './Card.mdx'; import { Button } from '../Button'; import { IconButton } from '../IconButton/IconButton'; @@ -18,17 +18,20 @@ export default { docs: { page: mdx, }, + knobs: { + disable: true, + }, + }, + argTypes: { + heading: { control: { disable: true } }, + description: { control: { disable: true } }, + href: { control: { disable: true } }, + tooltip: { control: { disable: true } }, + onClick: { control: { disable: true } }, }, }; -const getKnobs = () => { - const disabled = boolean('Disabled', false, 'Style props'); - - return { disabled }; -}; - -export const Basic = () => { - const { disabled } = getKnobs(); +export const Basic: Story = ({ disabled }) => { return ( { ); }; -export const AsLink = () => { - const { disabled } = getKnobs(); +export const AsLink: Story = ({ disabled }) => { return ( { ); }; -export const WithTooltip = () => { - const { disabled } = getKnobs(); +export const WithTooltip: Story = ({ disabled }) => { return ( { ); }; -export const WithTags = () => { - const { disabled } = getKnobs(); +export const WithTags: Story = ({ disabled }) => { return ( Elastic Search @@ -74,8 +74,7 @@ export const WithTags = () => { ); }; -export const WithMedia = () => { - const { disabled } = getKnobs(); +export const WithMedia: Story = ({ disabled }) => { return ( @@ -90,8 +89,7 @@ export const WithMedia = () => { ); }; -export const WithActions = () => { - const { disabled } = getKnobs(); +export const WithActions: Story = ({ disabled }) => { return ( @@ -119,9 +117,7 @@ export const WithActions = () => { ); }; -export const Full = () => { - const { disabled } = getKnobs(); - +export const Full: Story = ({ disabled }) => { return (