Commit 165c3adf by Tobias Skarhed Committed by GitHub

Storybook: Update categories (#21898)

* Update paths for Storybook categories

* Restructure categories
parent 59530e47
...@@ -35,6 +35,7 @@ addParameters({ ...@@ -35,6 +35,7 @@ addParameters({
info: {}, info: {},
options: { options: {
showPanel: true, showPanel: true,
showRoots: true,
panelPosition: 'bottom', panelPosition: 'bottom',
showNav: true, showNav: true,
isFullscreen: false, isFullscreen: false,
......
<Meta title="Intro" parameters={{ options: { isToolshown: false}}}/> <Meta title="Docs Overview/Intro" parameters={{ options: { isToolshown: false}, id: 1}}/>
# @grafana/ui # @grafana/ui
......
...@@ -11,7 +11,7 @@ const getKnobs = () => { ...@@ -11,7 +11,7 @@ const getKnobs = () => {
}; };
}; };
const BigValueStories = storiesOf('UI/BigValue', module); const BigValueStories = storiesOf('Visualizations/BigValue', module);
BigValueStories.addDecorator(withCenteredStory); BigValueStories.addDecorator(withCenteredStory);
......
...@@ -7,7 +7,7 @@ import { ThemeableCombinationsRowRenderer } from '../../utils/storybook/Combinat ...@@ -7,7 +7,7 @@ import { ThemeableCombinationsRowRenderer } from '../../utils/storybook/Combinat
import { boolean } from '@storybook/addon-knobs'; import { boolean } from '@storybook/addon-knobs';
import { getIconKnob } from '../../utils/storybook/knobs'; import { getIconKnob } from '../../utils/storybook/knobs';
const ButtonStories = storiesOf('UI/Button', module); const ButtonStories = storiesOf('General/Button', module);
const defaultProps = { const defaultProps = {
onClick: [action('Button clicked')], onClick: [action('Button clicked')],
......
...@@ -4,7 +4,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; ...@@ -4,7 +4,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import { ButtonCascader } from './ButtonCascader'; import { ButtonCascader } from './ButtonCascader';
export default { export default {
title: 'UI/ButtonCascader', title: 'General/ButtonCascader',
component: ButtonCascader, component: ButtonCascader,
decorators: [withKnobs, withCenteredStory], decorators: [withKnobs, withCenteredStory],
}; };
......
...@@ -6,7 +6,7 @@ import { select, text } from '@storybook/addon-knobs'; ...@@ -6,7 +6,7 @@ import { select, text } from '@storybook/addon-knobs';
import { Button } from '../Button/Button'; import { Button } from '../Button/Button';
import { action } from '@storybook/addon-actions'; import { action } from '@storybook/addon-actions';
const CallToActionCardStories = storiesOf('UI/CallToActionCard', module); const CallToActionCardStories = storiesOf('General/CallToActionCard', module);
CallToActionCardStories.add('default', () => { CallToActionCardStories.add('default', () => {
const ctaElements: { [key: string]: JSX.Element } = { const ctaElements: { [key: string]: JSX.Element } = {
......
...@@ -6,7 +6,7 @@ import mdx from './Cascader.mdx'; ...@@ -6,7 +6,7 @@ import mdx from './Cascader.mdx';
import React from 'react'; import React from 'react';
export default { export default {
title: 'UI/Cascader', title: 'General/Cascader',
component: Cascader, component: Cascader,
decorators: [withCenteredStory], decorators: [withCenteredStory],
parameters: { parameters: {
......
...@@ -13,7 +13,7 @@ const getColorPickerKnobs = () => { ...@@ -13,7 +13,7 @@ const getColorPickerKnobs = () => {
}; };
}; };
const ColorPickerStories = storiesOf('UI/ColorPicker/Pickers', module); const ColorPickerStories = storiesOf('General/ColorPicker/Pickers', module);
ColorPickerStories.addDecorator(withCenteredStory); ColorPickerStories.addDecorator(withCenteredStory);
......
...@@ -4,7 +4,7 @@ import { ColorPickerPopover } from './ColorPickerPopover'; ...@@ -4,7 +4,7 @@ import { ColorPickerPopover } from './ColorPickerPopover';
import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import { SeriesColorPickerPopover } from './SeriesColorPickerPopover'; import { SeriesColorPickerPopover } from './SeriesColorPickerPopover';
import { renderComponentWithTheme } from '../../utils/storybook/withTheme'; import { renderComponentWithTheme } from '../../utils/storybook/withTheme';
const ColorPickerPopoverStories = storiesOf('UI/ColorPicker/Popovers', module); const ColorPickerPopoverStories = storiesOf('General/ColorPicker/Popovers', module);
ColorPickerPopoverStories.addDecorator(withCenteredStory); ColorPickerPopoverStories.addDecorator(withCenteredStory);
......
...@@ -11,7 +11,7 @@ const BasicGreen = getColorDefinitionByName('green'); ...@@ -11,7 +11,7 @@ const BasicGreen = getColorDefinitionByName('green');
const BasicRed = getColorDefinitionByName('red'); const BasicRed = getColorDefinitionByName('red');
const LightBlue = getColorDefinitionByName('light-blue'); const LightBlue = getColorDefinitionByName('light-blue');
const NamedColorsPaletteStories = storiesOf('UI/ColorPicker/Palettes/NamedColorsPalette', module); const NamedColorsPaletteStories = storiesOf('General/ColorPicker/Palettes/NamedColorsPalette', module);
NamedColorsPaletteStories.addDecorator(withCenteredStory); NamedColorsPaletteStories.addDecorator(withCenteredStory);
......
...@@ -5,7 +5,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; ...@@ -5,7 +5,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import { UseState } from '../../utils/storybook/UseState'; import { UseState } from '../../utils/storybook/UseState';
import { renderComponentWithTheme } from '../../utils/storybook/withTheme'; import { renderComponentWithTheme } from '../../utils/storybook/withTheme';
const SpectrumPaletteStories = storiesOf('UI/ColorPicker/Palettes/SpectrumPalette', module); const SpectrumPaletteStories = storiesOf('General/ColorPicker/Palettes/SpectrumPalette', module);
SpectrumPaletteStories.addDecorator(withCenteredStory); SpectrumPaletteStories.addDecorator(withCenteredStory);
......
...@@ -26,7 +26,7 @@ const getKnobs = () => { ...@@ -26,7 +26,7 @@ const getKnobs = () => {
}; };
}; };
storiesOf('UI/ConfirmButton', module) storiesOf('General/ConfirmButton', module)
.addDecorator(withCenteredStory) .addDecorator(withCenteredStory)
.add('default', () => { .add('default', () => {
const { size, buttonText, confirmText, confirmVariant, disabled } = getKnobs(); const { size, buttonText, confirmText, confirmVariant, disabled } = getKnobs();
......
...@@ -12,7 +12,7 @@ const getKnobs = () => { ...@@ -12,7 +12,7 @@ const getKnobs = () => {
}; };
}; };
storiesOf('UI/ConfirmButton', module) storiesOf('General/ConfirmButton', module)
.addDecorator(withCenteredStory) .addDecorator(withCenteredStory)
.add('delete button', () => { .add('delete button', () => {
const { disabled, size } = getKnobs(); const { disabled, size } = getKnobs();
......
...@@ -24,7 +24,7 @@ const defaultActions = { ...@@ -24,7 +24,7 @@ const defaultActions = {
}, },
}; };
const ConfirmModalStories = storiesOf('UI/ConfirmModal', module); const ConfirmModalStories = storiesOf('General/ConfirmModal', module);
ConfirmModalStories.addDecorator(withCenteredStory); ConfirmModalStories.addDecorator(withCenteredStory);
......
...@@ -31,7 +31,7 @@ const settingsMock: DataSourceSettings<any, any> = { ...@@ -31,7 +31,7 @@ const settingsMock: DataSourceSettings<any, any> = {
readOnly: true, readOnly: true,
}; };
const DataSourceHttpSettingsStories = storiesOf('UI/DataSource/DataSourceHttpSettings', module); const DataSourceHttpSettingsStories = storiesOf('Panel/DataSource/DataSourceHttpSettings', module);
DataSourceHttpSettingsStories.add('default', () => { DataSourceHttpSettingsStories.add('default', () => {
return ( return (
......
...@@ -6,7 +6,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; ...@@ -6,7 +6,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import mdx from './Drawer.mdx'; import mdx from './Drawer.mdx';
export default { export default {
title: 'UI/Drawer', title: 'General/Drawer',
component: Drawer, component: Drawer,
decorators: [withCenteredStory], decorators: [withCenteredStory],
parameters: { parameters: {
......
...@@ -14,7 +14,7 @@ const getKnobs = () => { ...@@ -14,7 +14,7 @@ const getKnobs = () => {
}; };
}; };
const FormFieldStories = storiesOf('UI/FormField', module); const FormFieldStories = storiesOf('General/FormField', module);
FormFieldStories.addDecorator(withCenteredStory); FormFieldStories.addDecorator(withCenteredStory);
......
...@@ -7,7 +7,7 @@ import { ButtonSize } from '../Button/types'; ...@@ -7,7 +7,7 @@ import { ButtonSize } from '../Button/types';
import mdx from './Button.mdx'; import mdx from './Button.mdx';
export default { export default {
title: 'UI/Forms/Button', title: 'Forms/Button',
component: Button, component: Button,
decorators: [withCenteredStory, withHorizontallyCenteredStory], decorators: [withCenteredStory, withHorizontallyCenteredStory],
parameters: { parameters: {
......
...@@ -3,7 +3,7 @@ import mdx from './Checkbox.mdx'; ...@@ -3,7 +3,7 @@ import mdx from './Checkbox.mdx';
import { Checkbox } from './Checkbox'; import { Checkbox } from './Checkbox';
export default { export default {
title: 'UI/Forms/Checkbox', title: 'Forms/Checkbox',
component: Checkbox, component: Checkbox,
parameters: { parameters: {
docs: { docs: {
......
...@@ -6,7 +6,7 @@ import { Switch } from './Switch'; ...@@ -6,7 +6,7 @@ import { Switch } from './Switch';
import mdx from './Field.mdx'; import mdx from './Field.mdx';
export default { export default {
title: 'UI/Forms/Field', title: 'Forms/Field',
component: Field, component: Field,
parameters: { parameters: {
docs: { docs: {
......
...@@ -9,7 +9,7 @@ const getKnobs = () => { ...@@ -9,7 +9,7 @@ const getKnobs = () => {
}; };
export default { export default {
title: 'UI/Forms/FieldValidationMessage', title: 'Forms/FieldValidationMessage',
component: FieldValidationMessage, component: FieldValidationMessage,
}; };
......
...@@ -16,7 +16,7 @@ import Forms from './index'; ...@@ -16,7 +16,7 @@ import Forms from './index';
import mdx from './Form.mdx'; import mdx from './Form.mdx';
export default { export default {
title: 'UI/Forms/Test forms', title: 'Forms/Test forms',
decorators: [withStoryContainer, withCenteredStory], decorators: [withStoryContainer, withCenteredStory],
parameters: { parameters: {
docs: { docs: {
......
...@@ -9,7 +9,7 @@ import { KeyValue } from '@grafana/data'; ...@@ -9,7 +9,7 @@ import { KeyValue } from '@grafana/data';
import { Icon } from '../../Icon/Icon'; import { Icon } from '../../Icon/Icon';
export default { export default {
title: 'UI/Forms/Input', title: 'Forms/Input',
component: Input, component: Input,
decorators: [withCenteredStory], decorators: [withCenteredStory],
parameters: { parameters: {
......
...@@ -12,7 +12,7 @@ const getKnobs = () => { ...@@ -12,7 +12,7 @@ const getKnobs = () => {
}; };
export default { export default {
title: 'UI|Forms', title: 'Forms',
component: Label, component: Label,
}; };
......
...@@ -10,7 +10,7 @@ const getKnobs = () => { ...@@ -10,7 +10,7 @@ const getKnobs = () => {
}; };
}; };
const story = storiesOf('UI/Forms', module); const story = storiesOf('Forms', module);
story.add('Legend', () => { story.add('Legend', () => {
const { label } = getKnobs(); const { label } = getKnobs();
......
...@@ -3,7 +3,7 @@ import { RadioButton, RadioButtonSize } from './RadioButton'; ...@@ -3,7 +3,7 @@ import { RadioButton, RadioButtonSize } from './RadioButton';
import { boolean, select } from '@storybook/addon-knobs'; import { boolean, select } from '@storybook/addon-knobs';
export default { export default {
title: 'UI/Forms/RadioButton', title: 'Forms/RadioButton',
component: RadioButton, component: RadioButton,
}; };
......
...@@ -5,7 +5,7 @@ import { RadioButtonSize } from './RadioButton'; ...@@ -5,7 +5,7 @@ import { RadioButtonSize } from './RadioButton';
import { boolean, select } from '@storybook/addon-knobs'; import { boolean, select } from '@storybook/addon-knobs';
export default { export default {
title: 'UI/Forms/RadioButtonGroup', title: 'Forms/RadioButtonGroup',
component: RadioButtonGroup, component: RadioButtonGroup,
parameters: { parameters: {
docs: { docs: {
......
...@@ -11,7 +11,7 @@ import { getIconKnob } from '../../../utils/storybook/knobs'; ...@@ -11,7 +11,7 @@ import { getIconKnob } from '../../../utils/storybook/knobs';
import kebabCase from 'lodash/kebabCase'; import kebabCase from 'lodash/kebabCase';
export default { export default {
title: 'UI/Forms/Select', title: 'General/Select',
component: Select, component: Select,
decorators: [withCenteredStory, withHorizontallyCenteredStory], decorators: [withCenteredStory, withHorizontallyCenteredStory],
}; };
......
...@@ -5,7 +5,7 @@ import { Switch } from './Switch'; ...@@ -5,7 +5,7 @@ import { Switch } from './Switch';
import mdx from './Switch.mdx'; import mdx from './Switch.mdx';
export default { export default {
title: 'UI/Forms/Switch', title: 'Forms/Switch',
component: Switch, component: Switch,
decorators: [withCenteredStory, withHorizontallyCenteredStory], decorators: [withCenteredStory, withHorizontallyCenteredStory],
parameters: { parameters: {
......
...@@ -5,7 +5,7 @@ import { boolean, number, select, text } from '@storybook/addon-knobs'; ...@@ -5,7 +5,7 @@ import { boolean, number, select, text } from '@storybook/addon-knobs';
import mdx from './TextArea.mdx'; import mdx from './TextArea.mdx';
export default { export default {
title: 'UI/Forms/TextArea', title: 'Forms/TextArea',
component: TextArea, component: TextArea,
decorators: [withCenteredStory], decorators: [withCenteredStory],
parameters: { parameters: {
......
...@@ -8,7 +8,7 @@ import { TooltipContentProps } from '../Chart/Tooltip'; ...@@ -8,7 +8,7 @@ import { TooltipContentProps } from '../Chart/Tooltip';
import { JSONFormatter } from '../JSONFormatter/JSONFormatter'; import { JSONFormatter } from '../JSONFormatter/JSONFormatter';
export default { export default {
title: 'Visualizations/Graph/Graph', title: 'Visualizations|Graph/Graph',
component: Graph, component: Graph,
decorators: [withCenteredStory], decorators: [withCenteredStory],
}; };
......
...@@ -8,7 +8,7 @@ import { useTheme, selectThemeVariant } from '../../themes'; ...@@ -8,7 +8,7 @@ import { useTheme, selectThemeVariant } from '../../themes';
import mdx from './Icon.mdx'; import mdx from './Icon.mdx';
export default { export default {
title: 'UI/Icon', title: 'General/Icon',
component: Icon, component: Icon,
decorators: [withCenteredStory], decorators: [withCenteredStory],
parameters: { parameters: {
......
...@@ -4,6 +4,6 @@ import { storiesOf } from '@storybook/react'; ...@@ -4,6 +4,6 @@ import { storiesOf } from '@storybook/react';
import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import { InfoTooltip } from './InfoTooltip'; import { InfoTooltip } from './InfoTooltip';
const story = storiesOf('UI/Tooltip', module); const story = storiesOf('General/Tooltip', module);
story.addDecorator(withCenteredStory); story.addDecorator(withCenteredStory);
story.add('InfoTooltip', () => <InfoTooltip>This is the content of the tooltip</InfoTooltip>); story.add('InfoTooltip', () => <InfoTooltip>This is the content of the tooltip</InfoTooltip>);
...@@ -35,6 +35,6 @@ const Wrapper = () => { ...@@ -35,6 +35,6 @@ const Wrapper = () => {
return <Input value={value} onChange={e => setValue(e.currentTarget.value)} validationEvents={validations} />; return <Input value={value} onChange={e => setValue(e.currentTarget.value)} validationEvents={validations} />;
}; };
const story = storiesOf('UI/Input', module); const story = storiesOf('General/Input', module);
story.addDecorator(withCenteredStory); story.addDecorator(withCenteredStory);
story.add('input', () => <Wrapper />); story.add('input', () => <Wrapper />);
...@@ -87,7 +87,7 @@ const getStoriesKnobs = (table = false) => { ...@@ -87,7 +87,7 @@ const getStoriesKnobs = (table = false) => {
}; };
}; };
const LegendStories = storiesOf('UI/Legend/Legend', module); const LegendStories = storiesOf('General/Legend/Legend', module);
LegendStories.add('list', () => { LegendStories.add('list', () => {
const { numberOfSeries, itemRenderer, containerWidth, rightAxisSeries, legendPlacement } = getStoriesKnobs(); const { numberOfSeries, itemRenderer, containerWidth, rightAxisSeries, legendPlacement } = getStoriesKnobs();
......
...@@ -6,7 +6,7 @@ import { css, cx } from 'emotion'; ...@@ -6,7 +6,7 @@ import { css, cx } from 'emotion';
import tinycolor from 'tinycolor2'; import tinycolor from 'tinycolor2';
import { InlineList } from './InlineList'; import { InlineList } from './InlineList';
const ListStories = storiesOf('UI/List', module); const ListStories = storiesOf('General/List', module);
const generateListItems = (numberOfItems: number) => { const generateListItems = (numberOfItems: number) => {
return [...new Array(numberOfItems)].map((item, i) => { return [...new Array(numberOfItems)].map((item, i) => {
......
...@@ -23,7 +23,7 @@ amet.` ...@@ -23,7 +23,7 @@ amet.`
}; };
}; };
const ModalStories = storiesOf('UI/Modal', module); const ModalStories = storiesOf('General/Modal', module);
ModalStories.addDecorator(withCenteredStory); ModalStories.addDecorator(withCenteredStory);
......
...@@ -24,7 +24,7 @@ const getKnobs = () => { ...@@ -24,7 +24,7 @@ const getKnobs = () => {
}; };
}; };
const PieChartStories = storiesOf('UI/PieChart/PieChart', module); const PieChartStories = storiesOf('Visualizations/PieChart', module);
PieChartStories.addDecorator(withCenteredStory); PieChartStories.addDecorator(withCenteredStory);
......
...@@ -3,7 +3,7 @@ import { storiesOf } from '@storybook/react'; ...@@ -3,7 +3,7 @@ import { storiesOf } from '@storybook/react';
import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import { QueryField } from './QueryField'; import { QueryField } from './QueryField';
const QueryFieldStories = storiesOf('UI/QueryField', module); const QueryFieldStories = storiesOf('Panel/QueryField', module);
QueryFieldStories.addDecorator(withCenteredStory); QueryFieldStories.addDecorator(withCenteredStory);
......
...@@ -5,7 +5,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; ...@@ -5,7 +5,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import { UseState } from '../../utils/storybook/UseState'; import { UseState } from '../../utils/storybook/UseState';
import { RefreshPicker } from './RefreshPicker'; import { RefreshPicker } from './RefreshPicker';
const RefreshSelectStories = storiesOf('UI/RefreshPicker', module); const RefreshSelectStories = storiesOf('Panel/RefreshPicker', module);
RefreshSelectStories.addDecorator(withCenteredStory); RefreshSelectStories.addDecorator(withCenteredStory);
......
...@@ -7,7 +7,7 @@ import { SecretFormField } from './SecretFormField'; ...@@ -7,7 +7,7 @@ import { SecretFormField } from './SecretFormField';
import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import { UseState } from '../../utils/storybook/UseState'; import { UseState } from '../../utils/storybook/UseState';
const SecretFormFieldStories = storiesOf('UI/SecretFormField/SecretFormField', module); const SecretFormFieldStories = storiesOf('General/SecretFormField/SecretFormField', module);
SecretFormFieldStories.addDecorator(withCenteredStory); SecretFormFieldStories.addDecorator(withCenteredStory);
const getSecretFormFieldKnobs = () => { const getSecretFormFieldKnobs = () => {
......
...@@ -44,7 +44,7 @@ export const ArrayOptions = () => { ...@@ -44,7 +44,7 @@ export const ArrayOptions = () => {
}; };
export default { export default {
title: 'UI/Segment/SegmentSync', title: 'Panel/Segment/SegmentSync',
component: ArrayOptions, component: ArrayOptions,
}; };
......
...@@ -48,7 +48,7 @@ export const ArrayOptions = () => { ...@@ -48,7 +48,7 @@ export const ArrayOptions = () => {
}; };
export default { export default {
title: 'UI/Segment/SegmentAsync', title: 'Panel/Segment/SegmentAsync',
component: ArrayOptions, component: ArrayOptions,
}; };
......
...@@ -29,7 +29,7 @@ export const BasicInput = () => { ...@@ -29,7 +29,7 @@ export const BasicInput = () => {
}; };
export default { export default {
title: 'UI/Segment/SegmentInput', title: 'Panel/Segment/SegmentInput',
component: BasicInput, component: BasicInput,
}; };
......
...@@ -7,7 +7,7 @@ import { UseState } from '../../utils/storybook/UseState'; ...@@ -7,7 +7,7 @@ import { UseState } from '../../utils/storybook/UseState';
import { SelectableValue } from '@grafana/data'; import { SelectableValue } from '@grafana/data';
import { ButtonSelect } from './ButtonSelect'; import { ButtonSelect } from './ButtonSelect';
const ButtonSelectStories = storiesOf('UI/Select/ButtonSelect', module); const ButtonSelectStories = storiesOf('Panel/Select/ButtonSelect', module);
ButtonSelectStories.addDecorator(withCenteredStory).addDecorator(withKnobs); ButtonSelectStories.addDecorator(withCenteredStory).addDecorator(withKnobs);
......
...@@ -7,7 +7,7 @@ import { UseState } from '../../utils/storybook/UseState'; ...@@ -7,7 +7,7 @@ import { UseState } from '../../utils/storybook/UseState';
import { SelectableValue } from '@grafana/data'; import { SelectableValue } from '@grafana/data';
import { Select } from './Select'; import { Select } from './Select';
const SelectStories = storiesOf('UI/Select/Select', module); const SelectStories = storiesOf('General/Select/Select', module);
SelectStories.addDecorator(withCenteredStory).addDecorator(withKnobs); SelectStories.addDecorator(withCenteredStory).addDecorator(withKnobs);
......
...@@ -4,7 +4,7 @@ import { storiesOf } from '@storybook/react'; ...@@ -4,7 +4,7 @@ import { storiesOf } from '@storybook/react';
import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import { Spinner } from './Spinner'; import { Spinner } from './Spinner';
const story = storiesOf('UI/Spinner', module); const story = storiesOf('General/Spinner', module);
story.addDecorator(withCenteredStory); story.addDecorator(withCenteredStory);
story.add('spinner', () => { story.add('spinner', () => {
return ( return (
......
...@@ -61,7 +61,7 @@ export class WrapperWithState extends PureComponent<any, State> { ...@@ -61,7 +61,7 @@ export class WrapperWithState extends PureComponent<any, State> {
} }
} }
const story = storiesOf('UI/StatsPicker', module); const story = storiesOf('Panel/StatsPicker', module);
story.addDecorator(withCenteredStory); story.addDecorator(withCenteredStory);
story.add('picker', () => { story.add('picker', () => {
const { placeholder, defaultStat, allowMultiple, initialStats } = getKnobs(); const { placeholder, defaultStat, allowMultiple, initialStats } = getKnobs();
......
...@@ -14,7 +14,7 @@ const getStory = (title: string, component: any) => ({ ...@@ -14,7 +14,7 @@ const getStory = (title: string, component: any) => ({
}, },
}); });
export default getStory('UI|Switch', Switch); export default getStory('General/Switch', Switch);
const getKnobs = () => { const getKnobs = () => {
return { return {
......
...@@ -6,7 +6,7 @@ import { action } from '@storybook/addon-actions'; ...@@ -6,7 +6,7 @@ import { action } from '@storybook/addon-actions';
import { DataFrame } from '@grafana/data'; import { DataFrame } from '@grafana/data';
import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
const TableInputStories = storiesOf('UI/Table/Input', module); const TableInputStories = storiesOf('General/Table/Input', module);
TableInputStories.addDecorator(withCenteredStory); TableInputStories.addDecorator(withCenteredStory);
......
...@@ -6,7 +6,7 @@ import { Tab } from './Tab'; ...@@ -6,7 +6,7 @@ import { Tab } from './Tab';
import { TabContent } from './TabContent'; import { TabContent } from './TabContent';
export default { export default {
title: 'UI/Tabs/TabsExample', title: 'General/Tabs/TabsExample',
decorators: [withCenteredStory], decorators: [withCenteredStory],
}; };
......
...@@ -7,7 +7,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; ...@@ -7,7 +7,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import mdx from './TabsBar.mdx'; import mdx from './TabsBar.mdx';
export default { export default {
title: 'UI/Tabs/TabsBar', title: 'General/Tabs/TabsBar',
component: TabsBar, component: TabsBar,
decorators: [withCenteredStory], decorators: [withCenteredStory],
parameters: { parameters: {
......
...@@ -5,7 +5,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; ...@@ -5,7 +5,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import { UseState } from '../../utils/storybook/UseState'; import { UseState } from '../../utils/storybook/UseState';
import { TagsInput } from './TagsInput'; import { TagsInput } from './TagsInput';
const TagsInputStories = storiesOf('UI/TagsInput', module); const TagsInputStories = storiesOf('General/TagsInput', module);
const mockTags = ['Some', 'Tags', 'With', 'This', 'New', 'Component']; const mockTags = ['Some', 'Tags', 'With', 'This', 'New', 'Component'];
TagsInputStories.addDecorator(withCenteredStory); TagsInputStories.addDecorator(withCenteredStory);
......
...@@ -6,7 +6,7 @@ import { ThresholdsEditor } from './ThresholdsEditor'; ...@@ -6,7 +6,7 @@ import { ThresholdsEditor } from './ThresholdsEditor';
import { getTheme } from '../../themes'; import { getTheme } from '../../themes';
import { ThresholdsMode, ThresholdsConfig } from '@grafana/data'; import { ThresholdsMode, ThresholdsConfig } from '@grafana/data';
const ThresholdsEditorStories = storiesOf('UI/ThresholdsEditor', module); const ThresholdsEditorStories = storiesOf('Panel/ThresholdsEditor', module);
const thresholds: ThresholdsConfig = { const thresholds: ThresholdsConfig = {
mode: ThresholdsMode.Absolute, mode: ThresholdsMode.Absolute,
steps: [ steps: [
......
...@@ -7,7 +7,7 @@ import { UseState } from '../../utils/storybook/UseState'; ...@@ -7,7 +7,7 @@ import { UseState } from '../../utils/storybook/UseState';
import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import { dateTime } from '@grafana/data'; import { dateTime } from '@grafana/data';
const TimeOfDayPickerStories = storiesOf('UI/TimeOfDayPicker', module); const TimeOfDayPickerStories = storiesOf('General/TimeOfDayPicker', module);
TimeOfDayPickerStories.addDecorator(withCenteredStory); TimeOfDayPickerStories.addDecorator(withCenteredStory);
......
...@@ -7,7 +7,7 @@ import { UseState } from '../../utils/storybook/UseState'; ...@@ -7,7 +7,7 @@ import { UseState } from '../../utils/storybook/UseState';
import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import { TimeFragment, dateTime } from '@grafana/data'; import { TimeFragment, dateTime } from '@grafana/data';
const TimePickerStories = storiesOf('UI/TimePicker', module); const TimePickerStories = storiesOf('General/TimePicker', module);
TimePickerStories.addDecorator(withCenteredStory); TimePickerStories.addDecorator(withCenteredStory);
......
...@@ -6,7 +6,7 @@ import { TimeZonePicker } from './TimeZonePicker'; ...@@ -6,7 +6,7 @@ import { TimeZonePicker } from './TimeZonePicker';
import { UseState } from '../../utils/storybook/UseState'; import { UseState } from '../../utils/storybook/UseState';
import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
const TimeZonePickerStories = storiesOf('UI/TimeZonePicker', module); const TimeZonePickerStories = storiesOf('General/TimeZonePicker', module);
TimeZonePickerStories.addDecorator(withCenteredStory); TimeZonePickerStories.addDecorator(withCenteredStory);
......
...@@ -6,7 +6,7 @@ import { ToggleButton, ToggleButtonGroup } from './ToggleButtonGroup'; ...@@ -6,7 +6,7 @@ import { ToggleButton, ToggleButtonGroup } from './ToggleButtonGroup';
import { UseState } from '../../utils/storybook/UseState'; import { UseState } from '../../utils/storybook/UseState';
import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
const ToggleButtonGroupStories = storiesOf('UI/ToggleButtonGroup', module); const ToggleButtonGroupStories = storiesOf('General/ToggleButtonGroup', module);
const options = [ const options = [
{ value: 'first', label: 'First' }, { value: 'first', label: 'First' },
......
...@@ -5,7 +5,7 @@ import { UnitPicker } from './UnitPicker'; ...@@ -5,7 +5,7 @@ import { UnitPicker } from './UnitPicker';
import mdx from './UnitPicker.mdx'; import mdx from './UnitPicker.mdx';
export default { export default {
title: 'UI/UnitPicker', title: 'General/UnitPicker',
component: UnitPicker, component: UnitPicker,
decorators: [withCenteredStory], decorators: [withCenteredStory],
parameters: { parameters: {
......
...@@ -3,7 +3,7 @@ import { storiesOf } from '@storybook/react'; ...@@ -3,7 +3,7 @@ import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions'; import { action } from '@storybook/addon-actions';
import { ValueMappingsEditor } from './ValueMappingsEditor'; import { ValueMappingsEditor } from './ValueMappingsEditor';
const ValueMappingsEditorStories = storiesOf('UI/ValueMappingsEditor', module); const ValueMappingsEditorStories = storiesOf('Panel/ValueMappingsEditor', module);
ValueMappingsEditorStories.add('default', () => { ValueMappingsEditorStories.add('default', () => {
return <ValueMappingsEditor valueMappings={[]} onChange={action('Mapping changed')} />; return <ValueMappingsEditor valueMappings={[]} onChange={action('Mapping changed')} />;
......
...@@ -19,7 +19,7 @@ function StoryWrapper() { ...@@ -19,7 +19,7 @@ function StoryWrapper() {
return <div>{valueDelayed ? 'ON' : 'OFF'}</div>; return <div>{valueDelayed ? 'ON' : 'OFF'}</div>;
} }
const story = storiesOf('Utils/useDelayedSwitch', module); const story = storiesOf('useDelayedSwitch', module);
story.addDecorator(withCenteredStory); story.addDecorator(withCenteredStory);
story.add('useDelayedSwitch', () => { story.add('useDelayedSwitch', () => {
return <StoryWrapper />; return <StoryWrapper />;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment