Kaynağa Gözat

first stuff

Peter Holmberg 6 yıl önce
ebeveyn
işleme
bd6fed54de

+ 20 - 0
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 (
+    <ValueMappingsEditor
+      valueMappings={[]}
+      onChange={() => {
+        action('Mapping changed');
+      }}
+    />
+  );
+});