From bd6fed54de73d195df50a7e02666a454e3120726 Mon Sep 17 00:00:00 2001 From: Peter Holmberg Date: Fri, 1 Feb 2019 15:45:47 +0100 Subject: [PATCH 1/3] first stuff --- .../ValueMappingsEditor.story.tsx | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 packages/grafana-ui/src/components/ValueMappingsEditor/ValueMappingsEditor.story.tsx diff --git a/packages/grafana-ui/src/components/ValueMappingsEditor/ValueMappingsEditor.story.tsx b/packages/grafana-ui/src/components/ValueMappingsEditor/ValueMappingsEditor.story.tsx new file mode 100644 index 00000000000..31ba6454753 --- /dev/null +++ b/packages/grafana-ui/src/components/ValueMappingsEditor/ValueMappingsEditor.story.tsx @@ -0,0 +1,20 @@ +import React from 'react'; +import { storiesOf } from '@storybook/react'; +import { action } from '@storybook/addon-actions'; +import { ValueMappingsEditor } from './ValueMappingsEditor'; +import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; + +const ValueMappingsEditorStories = storiesOf('UI/ValueMappingsEditor', module); + +ValueMappingsEditorStories.addDecorator(withCenteredStory); + +ValueMappingsEditorStories.add('default', () => { + return ( + { + action('Mapping changed'); + }} + /> + ); +}); From 9ac960a80380b6b7612c443c041c0055bbd95759 Mon Sep 17 00:00:00 2001 From: Peter Holmberg Date: Sat, 2 Feb 2019 00:48:13 +0100 Subject: [PATCH 2/3] did not add file, removing centerered --- .../ValueMappingsEditor/ValueMappingsEditor.story.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/grafana-ui/src/components/ValueMappingsEditor/ValueMappingsEditor.story.tsx b/packages/grafana-ui/src/components/ValueMappingsEditor/ValueMappingsEditor.story.tsx index 31ba6454753..d6c8cec8c1e 100644 --- a/packages/grafana-ui/src/components/ValueMappingsEditor/ValueMappingsEditor.story.tsx +++ b/packages/grafana-ui/src/components/ValueMappingsEditor/ValueMappingsEditor.story.tsx @@ -2,12 +2,9 @@ import React from 'react'; import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import { ValueMappingsEditor } from './ValueMappingsEditor'; -import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; const ValueMappingsEditorStories = storiesOf('UI/ValueMappingsEditor', module); -ValueMappingsEditorStories.addDecorator(withCenteredStory); - ValueMappingsEditorStories.add('default', () => { return ( Date: Mon, 4 Feb 2019 10:22:45 +0100 Subject: [PATCH 3/3] fixing logging action --- .../ValueMappingsEditor/ValueMappingsEditor.story.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/grafana-ui/src/components/ValueMappingsEditor/ValueMappingsEditor.story.tsx b/packages/grafana-ui/src/components/ValueMappingsEditor/ValueMappingsEditor.story.tsx index d6c8cec8c1e..85504f6cd09 100644 --- a/packages/grafana-ui/src/components/ValueMappingsEditor/ValueMappingsEditor.story.tsx +++ b/packages/grafana-ui/src/components/ValueMappingsEditor/ValueMappingsEditor.story.tsx @@ -6,12 +6,5 @@ import { ValueMappingsEditor } from './ValueMappingsEditor'; const ValueMappingsEditorStories = storiesOf('UI/ValueMappingsEditor', module); ValueMappingsEditorStories.add('default', () => { - return ( - { - action('Mapping changed'); - }} - /> - ); + return ; });