diff --git a/packages/grafana-ui/src/components/DateTimePickers/WeekStartPicker.story.tsx b/packages/grafana-ui/src/components/DateTimePickers/WeekStartPicker.story.tsx index 93bbcfab8dc..a0571044646 100644 --- a/packages/grafana-ui/src/components/DateTimePickers/WeekStartPicker.story.tsx +++ b/packages/grafana-ui/src/components/DateTimePickers/WeekStartPicker.story.tsx @@ -1,40 +1,34 @@ import { action } from '@storybook/addon-actions'; -import { ComponentMeta } from '@storybook/react'; +import { useArgs } from '@storybook/client-api'; +import { ComponentMeta, ComponentStory } from '@storybook/react'; import React from 'react'; import { WeekStartPicker } from '@grafana/ui'; -import { UseState } from '../../utils/storybook/UseState'; import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; const meta: ComponentMeta = { title: 'Pickers and Editors/TimePickers/WeekStartPicker', component: WeekStartPicker, decorators: [withCenteredStory], + parameters: { + controls: { + exclude: ['onBlur', 'onChange', 'inputId'], + }, + }, }; -export const basic = () => { +export const Basic: ComponentStory = (args) => { + const [, updateArgs] = useArgs(); return ( - { + action('onChange')(newValue); + updateArgs({ value: newValue }); }} - > - {(value, updateValue) => { - return ( - { - if (!newValue) { - return; - } - action('on selected')(newValue); - updateValue({ value: newValue }); - }} - /> - ); - }} - + onBlur={action('onBlur')} + /> ); }; diff --git a/packages/grafana-ui/src/components/DateTimePickers/WeekStartPicker.tsx b/packages/grafana-ui/src/components/DateTimePickers/WeekStartPicker.tsx index 504c7ee736f..eb6b16930a9 100644 --- a/packages/grafana-ui/src/components/DateTimePickers/WeekStartPicker.tsx +++ b/packages/grafana-ui/src/components/DateTimePickers/WeekStartPicker.tsx @@ -11,7 +11,6 @@ export interface Props { width?: number; autoFocus?: boolean; onBlur?: () => void; - includeInternal?: boolean; disabled?: boolean; inputId?: string; }