Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
165c3adf
Unverified
Commit
165c3adf
authored
Feb 06, 2020
by
Tobias Skarhed
Committed by
GitHub
Feb 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Storybook: Update categories (#21898)
* Update paths for Storybook categories * Restructure categories
parent
59530e47
Hide whitespace changes
Inline
Side-by-side
Showing
61 changed files
with
61 additions
and
60 deletions
+61
-60
packages/grafana-ui/.storybook/preview.ts
+1
-0
packages/grafana-ui/src/Intro.story.mdx
+1
-1
packages/grafana-ui/src/components/BigValue/BigValue.story.tsx
+1
-1
packages/grafana-ui/src/components/Button/Button.story.tsx
+1
-1
packages/grafana-ui/src/components/ButtonCascader/ButtonCascader.story.tsx
+1
-1
packages/grafana-ui/src/components/CallToActionCard/CallToActionCard.story.tsx
+1
-1
packages/grafana-ui/src/components/Cascader/Cascader.story.tsx
+1
-1
packages/grafana-ui/src/components/ColorPicker/ColorPicker.story.tsx
+1
-1
packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.story.tsx
+1
-1
packages/grafana-ui/src/components/ColorPicker/NamedColorsPalette.story.tsx
+1
-1
packages/grafana-ui/src/components/ColorPicker/SpectrumPalette.story.tsx
+1
-1
packages/grafana-ui/src/components/ConfirmButton/ConfirmButton.story.tsx
+1
-1
packages/grafana-ui/src/components/ConfirmButton/DeleteButton.story.tsx
+1
-1
packages/grafana-ui/src/components/ConfirmModal/ConfirmModal.story.tsx
+1
-1
packages/grafana-ui/src/components/DataSourceSettings/DataSourceHttpSettings.story.tsx
+1
-1
packages/grafana-ui/src/components/Drawer/Drawer.story.tsx
+1
-1
packages/grafana-ui/src/components/FormField/FormField.story.tsx
+1
-1
packages/grafana-ui/src/components/Forms/Button.story.tsx
+1
-1
packages/grafana-ui/src/components/Forms/Checkbox.story.tsx
+1
-1
packages/grafana-ui/src/components/Forms/Field.story.tsx
+1
-1
packages/grafana-ui/src/components/Forms/FieldValidationMessage.story.tsx
+1
-1
packages/grafana-ui/src/components/Forms/Form.story.tsx
+1
-1
packages/grafana-ui/src/components/Forms/Input/Input.story.tsx
+1
-1
packages/grafana-ui/src/components/Forms/Label.story.tsx
+1
-1
packages/grafana-ui/src/components/Forms/Legend.story.tsx
+1
-1
packages/grafana-ui/src/components/Forms/RadioButtonGroup/RadioButton.story.tsx
+1
-1
packages/grafana-ui/src/components/Forms/RadioButtonGroup/RadioButtonGroup.story.tsx
+1
-1
packages/grafana-ui/src/components/Forms/Select/Select.story.tsx
+1
-1
packages/grafana-ui/src/components/Forms/Switch.story.tsx
+1
-1
packages/grafana-ui/src/components/Forms/TextArea/TextArea.story.tsx
+1
-1
packages/grafana-ui/src/components/Graph/Graph.story.tsx
+1
-1
packages/grafana-ui/src/components/Icon/Icon.story.tsx
+1
-1
packages/grafana-ui/src/components/InfoTooltip/InfoTooltip.story.tsx
+1
-1
packages/grafana-ui/src/components/Input/Input.story.tsx
+1
-1
packages/grafana-ui/src/components/Legend/Legend.story.tsx
+1
-1
packages/grafana-ui/src/components/List/List.story.tsx
+1
-1
packages/grafana-ui/src/components/Modal/Modal.story.tsx
+1
-1
packages/grafana-ui/src/components/PieChart/PieChart.story.tsx
+1
-1
packages/grafana-ui/src/components/QueryField/QueryField.story.tsx
+1
-1
packages/grafana-ui/src/components/RefreshPicker/RefreshPicker.story.tsx
+1
-1
packages/grafana-ui/src/components/SecretFormFied/SecretFormField.story.tsx
+1
-1
packages/grafana-ui/src/components/Segment/Segment.story.tsx
+1
-1
packages/grafana-ui/src/components/Segment/SegmentAsync.story.tsx
+1
-1
packages/grafana-ui/src/components/Segment/SegmentInput.story.tsx
+1
-1
packages/grafana-ui/src/components/Select/ButtonSelect.story.tsx
+1
-1
packages/grafana-ui/src/components/Select/Select.story.tsx
+1
-1
packages/grafana-ui/src/components/Spinner/Spinner.story.tsx
+1
-1
packages/grafana-ui/src/components/StatsPicker/StatsPicker.story.tsx
+1
-1
packages/grafana-ui/src/components/Switch/Switch.story.tsx
+1
-1
packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.story.tsx
+1
-1
packages/grafana-ui/src/components/Tabs/Tabs.story.tsx
+1
-1
packages/grafana-ui/src/components/Tabs/TabsBar.story.tsx
+1
-1
packages/grafana-ui/src/components/TagsInput/TagsInput.story.tsx
+1
-1
packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.story.tsx
+1
-1
packages/grafana-ui/src/components/TimePicker/TimeOfDayPicker.story.tsx
+1
-1
packages/grafana-ui/src/components/TimePicker/TimePicker.story.tsx
+1
-1
packages/grafana-ui/src/components/TimePicker/TimeZonePicker.story.tsx
+1
-1
packages/grafana-ui/src/components/ToggleButtonGroup/ToggleButtonGroup.story.tsx
+1
-1
packages/grafana-ui/src/components/UnitPicker/UnitPicker.story.tsx
+1
-1
packages/grafana-ui/src/components/ValueMappingsEditor/ValueMappingsEditor.story.tsx
+1
-1
packages/grafana-ui/src/utils/useDelayedSwitch.story.tsx
+1
-1
No files found.
packages/grafana-ui/.storybook/preview.ts
View file @
165c3adf
...
...
@@ -35,6 +35,7 @@ addParameters({
info
:
{},
options
:
{
showPanel
:
true
,
showRoots
:
true
,
panelPosition
:
'bottom'
,
showNav
:
true
,
isFullscreen
:
false
,
...
...
packages/grafana-ui/src/Intro.story.mdx
View file @
165c3adf
<Meta title="
Intro" parameters={{ options: { isToolshown: false}
}}/>
<Meta title="
Docs Overview/Intro" parameters={{ options: { isToolshown: false}, id: 1
}}/>
# @grafana/ui
...
...
packages/grafana-ui/src/components/BigValue/BigValue.story.tsx
View file @
165c3adf
...
...
@@ -11,7 +11,7 @@ const getKnobs = () => {
};
};
const
BigValueStories
=
storiesOf
(
'
UI
/BigValue'
,
module
);
const
BigValueStories
=
storiesOf
(
'
Visualizations
/BigValue'
,
module
);
BigValueStories
.
addDecorator
(
withCenteredStory
);
...
...
packages/grafana-ui/src/components/Button/Button.story.tsx
View file @
165c3adf
...
...
@@ -7,7 +7,7 @@ import { ThemeableCombinationsRowRenderer } from '../../utils/storybook/Combinat
import
{
boolean
}
from
'@storybook/addon-knobs'
;
import
{
getIconKnob
}
from
'../../utils/storybook/knobs'
;
const
ButtonStories
=
storiesOf
(
'
UI
/Button'
,
module
);
const
ButtonStories
=
storiesOf
(
'
General
/Button'
,
module
);
const
defaultProps
=
{
onClick
:
[
action
(
'Button clicked'
)],
...
...
packages/grafana-ui/src/components/ButtonCascader/ButtonCascader.story.tsx
View file @
165c3adf
...
...
@@ -4,7 +4,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import
{
ButtonCascader
}
from
'./ButtonCascader'
;
export
default
{
title
:
'
UI
/ButtonCascader'
,
title
:
'
General
/ButtonCascader'
,
component
:
ButtonCascader
,
decorators
:
[
withKnobs
,
withCenteredStory
],
};
...
...
packages/grafana-ui/src/components/CallToActionCard/CallToActionCard.story.tsx
View file @
165c3adf
...
...
@@ -6,7 +6,7 @@ import { select, text } from '@storybook/addon-knobs';
import
{
Button
}
from
'../Button/Button'
;
import
{
action
}
from
'@storybook/addon-actions'
;
const
CallToActionCardStories
=
storiesOf
(
'
UI
/CallToActionCard'
,
module
);
const
CallToActionCardStories
=
storiesOf
(
'
General
/CallToActionCard'
,
module
);
CallToActionCardStories
.
add
(
'default'
,
()
=>
{
const
ctaElements
:
{
[
key
:
string
]:
JSX
.
Element
}
=
{
...
...
packages/grafana-ui/src/components/Cascader/Cascader.story.tsx
View file @
165c3adf
...
...
@@ -6,7 +6,7 @@ import mdx from './Cascader.mdx';
import
React
from
'react'
;
export
default
{
title
:
'
UI
/Cascader'
,
title
:
'
General
/Cascader'
,
component
:
Cascader
,
decorators
:
[
withCenteredStory
],
parameters
:
{
...
...
packages/grafana-ui/src/components/ColorPicker/ColorPicker.story.tsx
View file @
165c3adf
...
...
@@ -13,7 +13,7 @@ const getColorPickerKnobs = () => {
};
};
const
ColorPickerStories
=
storiesOf
(
'
UI
/ColorPicker/Pickers'
,
module
);
const
ColorPickerStories
=
storiesOf
(
'
General
/ColorPicker/Pickers'
,
module
);
ColorPickerStories
.
addDecorator
(
withCenteredStory
);
...
...
packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.story.tsx
View file @
165c3adf
...
...
@@ -4,7 +4,7 @@ import { ColorPickerPopover } from './ColorPickerPopover';
import
{
withCenteredStory
}
from
'../../utils/storybook/withCenteredStory'
;
import
{
SeriesColorPickerPopover
}
from
'./SeriesColorPickerPopover'
;
import
{
renderComponentWithTheme
}
from
'../../utils/storybook/withTheme'
;
const
ColorPickerPopoverStories
=
storiesOf
(
'
UI
/ColorPicker/Popovers'
,
module
);
const
ColorPickerPopoverStories
=
storiesOf
(
'
General
/ColorPicker/Popovers'
,
module
);
ColorPickerPopoverStories
.
addDecorator
(
withCenteredStory
);
...
...
packages/grafana-ui/src/components/ColorPicker/NamedColorsPalette.story.tsx
View file @
165c3adf
...
...
@@ -11,7 +11,7 @@ const BasicGreen = getColorDefinitionByName('green');
const
BasicRed
=
getColorDefinitionByName
(
'red'
);
const
LightBlue
=
getColorDefinitionByName
(
'light-blue'
);
const
NamedColorsPaletteStories
=
storiesOf
(
'
UI
/ColorPicker/Palettes/NamedColorsPalette'
,
module
);
const
NamedColorsPaletteStories
=
storiesOf
(
'
General
/ColorPicker/Palettes/NamedColorsPalette'
,
module
);
NamedColorsPaletteStories
.
addDecorator
(
withCenteredStory
);
...
...
packages/grafana-ui/src/components/ColorPicker/SpectrumPalette.story.tsx
View file @
165c3adf
...
...
@@ -5,7 +5,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import
{
UseState
}
from
'../../utils/storybook/UseState'
;
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
);
...
...
packages/grafana-ui/src/components/ConfirmButton/ConfirmButton.story.tsx
View file @
165c3adf
...
...
@@ -26,7 +26,7 @@ const getKnobs = () => {
};
};
storiesOf
(
'
UI
/ConfirmButton'
,
module
)
storiesOf
(
'
General
/ConfirmButton'
,
module
)
.
addDecorator
(
withCenteredStory
)
.
add
(
'default'
,
()
=>
{
const
{
size
,
buttonText
,
confirmText
,
confirmVariant
,
disabled
}
=
getKnobs
();
...
...
packages/grafana-ui/src/components/ConfirmButton/DeleteButton.story.tsx
View file @
165c3adf
...
...
@@ -12,7 +12,7 @@ const getKnobs = () => {
};
};
storiesOf
(
'
UI
/ConfirmButton'
,
module
)
storiesOf
(
'
General
/ConfirmButton'
,
module
)
.
addDecorator
(
withCenteredStory
)
.
add
(
'delete button'
,
()
=>
{
const
{
disabled
,
size
}
=
getKnobs
();
...
...
packages/grafana-ui/src/components/ConfirmModal/ConfirmModal.story.tsx
View file @
165c3adf
...
...
@@ -24,7 +24,7 @@ const defaultActions = {
},
};
const
ConfirmModalStories
=
storiesOf
(
'
UI
/ConfirmModal'
,
module
);
const
ConfirmModalStories
=
storiesOf
(
'
General
/ConfirmModal'
,
module
);
ConfirmModalStories
.
addDecorator
(
withCenteredStory
);
...
...
packages/grafana-ui/src/components/DataSourceSettings/DataSourceHttpSettings.story.tsx
View file @
165c3adf
...
...
@@ -31,7 +31,7 @@ const settingsMock: DataSourceSettings<any, any> = {
readOnly
:
true
,
};
const
DataSourceHttpSettingsStories
=
storiesOf
(
'
UI
/DataSource/DataSourceHttpSettings'
,
module
);
const
DataSourceHttpSettingsStories
=
storiesOf
(
'
Panel
/DataSource/DataSourceHttpSettings'
,
module
);
DataSourceHttpSettingsStories
.
add
(
'default'
,
()
=>
{
return
(
...
...
packages/grafana-ui/src/components/Drawer/Drawer.story.tsx
View file @
165c3adf
...
...
@@ -6,7 +6,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import
mdx
from
'./Drawer.mdx'
;
export
default
{
title
:
'
UI
/Drawer'
,
title
:
'
General
/Drawer'
,
component
:
Drawer
,
decorators
:
[
withCenteredStory
],
parameters
:
{
...
...
packages/grafana-ui/src/components/FormField/FormField.story.tsx
View file @
165c3adf
...
...
@@ -14,7 +14,7 @@ const getKnobs = () => {
};
};
const
FormFieldStories
=
storiesOf
(
'
UI
/FormField'
,
module
);
const
FormFieldStories
=
storiesOf
(
'
General
/FormField'
,
module
);
FormFieldStories
.
addDecorator
(
withCenteredStory
);
...
...
packages/grafana-ui/src/components/Forms/Button.story.tsx
View file @
165c3adf
...
...
@@ -7,7 +7,7 @@ import { ButtonSize } from '../Button/types';
import
mdx
from
'./Button.mdx'
;
export
default
{
title
:
'
UI/
Forms/Button'
,
title
:
'Forms/Button'
,
component
:
Button
,
decorators
:
[
withCenteredStory
,
withHorizontallyCenteredStory
],
parameters
:
{
...
...
packages/grafana-ui/src/components/Forms/Checkbox.story.tsx
View file @
165c3adf
...
...
@@ -3,7 +3,7 @@ import mdx from './Checkbox.mdx';
import
{
Checkbox
}
from
'./Checkbox'
;
export
default
{
title
:
'
UI/
Forms/Checkbox'
,
title
:
'Forms/Checkbox'
,
component
:
Checkbox
,
parameters
:
{
docs
:
{
...
...
packages/grafana-ui/src/components/Forms/Field.story.tsx
View file @
165c3adf
...
...
@@ -6,7 +6,7 @@ import { Switch } from './Switch';
import
mdx
from
'./Field.mdx'
;
export
default
{
title
:
'
UI/
Forms/Field'
,
title
:
'Forms/Field'
,
component
:
Field
,
parameters
:
{
docs
:
{
...
...
packages/grafana-ui/src/components/Forms/FieldValidationMessage.story.tsx
View file @
165c3adf
...
...
@@ -9,7 +9,7 @@ const getKnobs = () => {
};
export
default
{
title
:
'
UI/
Forms/FieldValidationMessage'
,
title
:
'Forms/FieldValidationMessage'
,
component
:
FieldValidationMessage
,
};
...
...
packages/grafana-ui/src/components/Forms/Form.story.tsx
View file @
165c3adf
...
...
@@ -16,7 +16,7 @@ import Forms from './index';
import
mdx
from
'./Form.mdx'
;
export
default
{
title
:
'
UI/
Forms/Test forms'
,
title
:
'Forms/Test forms'
,
decorators
:
[
withStoryContainer
,
withCenteredStory
],
parameters
:
{
docs
:
{
...
...
packages/grafana-ui/src/components/Forms/Input/Input.story.tsx
View file @
165c3adf
...
...
@@ -9,7 +9,7 @@ import { KeyValue } from '@grafana/data';
import
{
Icon
}
from
'../../Icon/Icon'
;
export
default
{
title
:
'
UI/
Forms/Input'
,
title
:
'Forms/Input'
,
component
:
Input
,
decorators
:
[
withCenteredStory
],
parameters
:
{
...
...
packages/grafana-ui/src/components/Forms/Label.story.tsx
View file @
165c3adf
...
...
@@ -12,7 +12,7 @@ const getKnobs = () => {
};
export
default
{
title
:
'
UI|
Forms'
,
title
:
'Forms'
,
component
:
Label
,
};
...
...
packages/grafana-ui/src/components/Forms/Legend.story.tsx
View file @
165c3adf
...
...
@@ -10,7 +10,7 @@ const getKnobs = () => {
};
};
const
story
=
storiesOf
(
'
UI/
Forms'
,
module
);
const
story
=
storiesOf
(
'Forms'
,
module
);
story
.
add
(
'Legend'
,
()
=>
{
const
{
label
}
=
getKnobs
();
...
...
packages/grafana-ui/src/components/Forms/RadioButtonGroup/RadioButton.story.tsx
View file @
165c3adf
...
...
@@ -3,7 +3,7 @@ import { RadioButton, RadioButtonSize } from './RadioButton';
import
{
boolean
,
select
}
from
'@storybook/addon-knobs'
;
export
default
{
title
:
'
UI/
Forms/RadioButton'
,
title
:
'Forms/RadioButton'
,
component
:
RadioButton
,
};
...
...
packages/grafana-ui/src/components/Forms/RadioButtonGroup/RadioButtonGroup.story.tsx
View file @
165c3adf
...
...
@@ -5,7 +5,7 @@ import { RadioButtonSize } from './RadioButton';
import
{
boolean
,
select
}
from
'@storybook/addon-knobs'
;
export
default
{
title
:
'
UI/
Forms/RadioButtonGroup'
,
title
:
'Forms/RadioButtonGroup'
,
component
:
RadioButtonGroup
,
parameters
:
{
docs
:
{
...
...
packages/grafana-ui/src/components/Forms/Select/Select.story.tsx
View file @
165c3adf
...
...
@@ -11,7 +11,7 @@ import { getIconKnob } from '../../../utils/storybook/knobs';
import
kebabCase
from
'lodash/kebabCase'
;
export
default
{
title
:
'
UI/Forms
/Select'
,
title
:
'
General
/Select'
,
component
:
Select
,
decorators
:
[
withCenteredStory
,
withHorizontallyCenteredStory
],
};
...
...
packages/grafana-ui/src/components/Forms/Switch.story.tsx
View file @
165c3adf
...
...
@@ -5,7 +5,7 @@ import { Switch } from './Switch';
import
mdx
from
'./Switch.mdx'
;
export
default
{
title
:
'
UI/
Forms/Switch'
,
title
:
'Forms/Switch'
,
component
:
Switch
,
decorators
:
[
withCenteredStory
,
withHorizontallyCenteredStory
],
parameters
:
{
...
...
packages/grafana-ui/src/components/Forms/TextArea/TextArea.story.tsx
View file @
165c3adf
...
...
@@ -5,7 +5,7 @@ import { boolean, number, select, text } from '@storybook/addon-knobs';
import
mdx
from
'./TextArea.mdx'
;
export
default
{
title
:
'
UI/
Forms/TextArea'
,
title
:
'Forms/TextArea'
,
component
:
TextArea
,
decorators
:
[
withCenteredStory
],
parameters
:
{
...
...
packages/grafana-ui/src/components/Graph/Graph.story.tsx
View file @
165c3adf
...
...
@@ -8,7 +8,7 @@ import { TooltipContentProps } from '../Chart/Tooltip';
import
{
JSONFormatter
}
from
'../JSONFormatter/JSONFormatter'
;
export
default
{
title
:
'Visualizations
/
Graph/Graph'
,
title
:
'Visualizations
|
Graph/Graph'
,
component
:
Graph
,
decorators
:
[
withCenteredStory
],
};
...
...
packages/grafana-ui/src/components/Icon/Icon.story.tsx
View file @
165c3adf
...
...
@@ -8,7 +8,7 @@ import { useTheme, selectThemeVariant } from '../../themes';
import
mdx
from
'./Icon.mdx'
;
export
default
{
title
:
'
UI
/Icon'
,
title
:
'
General
/Icon'
,
component
:
Icon
,
decorators
:
[
withCenteredStory
],
parameters
:
{
...
...
packages/grafana-ui/src/components/InfoTooltip/InfoTooltip.story.tsx
View file @
165c3adf
...
...
@@ -4,6 +4,6 @@ import { storiesOf } from '@storybook/react';
import
{
withCenteredStory
}
from
'../../utils/storybook/withCenteredStory'
;
import
{
InfoTooltip
}
from
'./InfoTooltip'
;
const
story
=
storiesOf
(
'
UI
/Tooltip'
,
module
);
const
story
=
storiesOf
(
'
General
/Tooltip'
,
module
);
story
.
addDecorator
(
withCenteredStory
);
story
.
add
(
'InfoTooltip'
,
()
=>
<
InfoTooltip
>
This is the content of the tooltip
</
InfoTooltip
>);
packages/grafana-ui/src/components/Input/Input.story.tsx
View file @
165c3adf
...
...
@@ -35,6 +35,6 @@ const Wrapper = () => {
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
.
add
(
'input'
,
()
=>
<
Wrapper
/>);
packages/grafana-ui/src/components/Legend/Legend.story.tsx
View file @
165c3adf
...
...
@@ -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'
,
()
=>
{
const
{
numberOfSeries
,
itemRenderer
,
containerWidth
,
rightAxisSeries
,
legendPlacement
}
=
getStoriesKnobs
();
...
...
packages/grafana-ui/src/components/List/List.story.tsx
View file @
165c3adf
...
...
@@ -6,7 +6,7 @@ import { css, cx } from 'emotion';
import
tinycolor
from
'tinycolor2'
;
import
{
InlineList
}
from
'./InlineList'
;
const
ListStories
=
storiesOf
(
'
UI
/List'
,
module
);
const
ListStories
=
storiesOf
(
'
General
/List'
,
module
);
const
generateListItems
=
(
numberOfItems
:
number
)
=>
{
return
[...
new
Array
(
numberOfItems
)].
map
((
item
,
i
)
=>
{
...
...
packages/grafana-ui/src/components/Modal/Modal.story.tsx
View file @
165c3adf
...
...
@@ -23,7 +23,7 @@ amet.`
};
};
const
ModalStories
=
storiesOf
(
'
UI
/Modal'
,
module
);
const
ModalStories
=
storiesOf
(
'
General
/Modal'
,
module
);
ModalStories
.
addDecorator
(
withCenteredStory
);
...
...
packages/grafana-ui/src/components/PieChart/PieChart.story.tsx
View file @
165c3adf
...
...
@@ -24,7 +24,7 @@ const getKnobs = () => {
};
};
const
PieChartStories
=
storiesOf
(
'
UI/PieChart
/PieChart'
,
module
);
const
PieChartStories
=
storiesOf
(
'
Visualizations
/PieChart'
,
module
);
PieChartStories
.
addDecorator
(
withCenteredStory
);
...
...
packages/grafana-ui/src/components/QueryField/QueryField.story.tsx
View file @
165c3adf
...
...
@@ -3,7 +3,7 @@ import { storiesOf } from '@storybook/react';
import
{
withCenteredStory
}
from
'../../utils/storybook/withCenteredStory'
;
import
{
QueryField
}
from
'./QueryField'
;
const
QueryFieldStories
=
storiesOf
(
'
UI
/QueryField'
,
module
);
const
QueryFieldStories
=
storiesOf
(
'
Panel
/QueryField'
,
module
);
QueryFieldStories
.
addDecorator
(
withCenteredStory
);
...
...
packages/grafana-ui/src/components/RefreshPicker/RefreshPicker.story.tsx
View file @
165c3adf
...
...
@@ -5,7 +5,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import
{
UseState
}
from
'../../utils/storybook/UseState'
;
import
{
RefreshPicker
}
from
'./RefreshPicker'
;
const
RefreshSelectStories
=
storiesOf
(
'
UI
/RefreshPicker'
,
module
);
const
RefreshSelectStories
=
storiesOf
(
'
Panel
/RefreshPicker'
,
module
);
RefreshSelectStories
.
addDecorator
(
withCenteredStory
);
...
...
packages/grafana-ui/src/components/SecretFormFied/SecretFormField.story.tsx
View file @
165c3adf
...
...
@@ -7,7 +7,7 @@ import { SecretFormField } from './SecretFormField';
import
{
withCenteredStory
}
from
'../../utils/storybook/withCenteredStory'
;
import
{
UseState
}
from
'../../utils/storybook/UseState'
;
const
SecretFormFieldStories
=
storiesOf
(
'
UI
/SecretFormField/SecretFormField'
,
module
);
const
SecretFormFieldStories
=
storiesOf
(
'
General
/SecretFormField/SecretFormField'
,
module
);
SecretFormFieldStories
.
addDecorator
(
withCenteredStory
);
const
getSecretFormFieldKnobs
=
()
=>
{
...
...
packages/grafana-ui/src/components/Segment/Segment.story.tsx
View file @
165c3adf
...
...
@@ -44,7 +44,7 @@ export const ArrayOptions = () => {
};
export
default
{
title
:
'
UI
/Segment/SegmentSync'
,
title
:
'
Panel
/Segment/SegmentSync'
,
component
:
ArrayOptions
,
};
...
...
packages/grafana-ui/src/components/Segment/SegmentAsync.story.tsx
View file @
165c3adf
...
...
@@ -48,7 +48,7 @@ export const ArrayOptions = () => {
};
export
default
{
title
:
'
UI
/Segment/SegmentAsync'
,
title
:
'
Panel
/Segment/SegmentAsync'
,
component
:
ArrayOptions
,
};
...
...
packages/grafana-ui/src/components/Segment/SegmentInput.story.tsx
View file @
165c3adf
...
...
@@ -29,7 +29,7 @@ export const BasicInput = () => {
};
export
default
{
title
:
'
UI
/Segment/SegmentInput'
,
title
:
'
Panel
/Segment/SegmentInput'
,
component
:
BasicInput
,
};
...
...
packages/grafana-ui/src/components/Select/ButtonSelect.story.tsx
View file @
165c3adf
...
...
@@ -7,7 +7,7 @@ import { UseState } from '../../utils/storybook/UseState';
import
{
SelectableValue
}
from
'@grafana/data'
;
import
{
ButtonSelect
}
from
'./ButtonSelect'
;
const
ButtonSelectStories
=
storiesOf
(
'
UI
/Select/ButtonSelect'
,
module
);
const
ButtonSelectStories
=
storiesOf
(
'
Panel
/Select/ButtonSelect'
,
module
);
ButtonSelectStories
.
addDecorator
(
withCenteredStory
).
addDecorator
(
withKnobs
);
...
...
packages/grafana-ui/src/components/Select/Select.story.tsx
View file @
165c3adf
...
...
@@ -7,7 +7,7 @@ import { UseState } from '../../utils/storybook/UseState';
import
{
SelectableValue
}
from
'@grafana/data'
;
import
{
Select
}
from
'./Select'
;
const
SelectStories
=
storiesOf
(
'
UI
/Select/Select'
,
module
);
const
SelectStories
=
storiesOf
(
'
General
/Select/Select'
,
module
);
SelectStories
.
addDecorator
(
withCenteredStory
).
addDecorator
(
withKnobs
);
...
...
packages/grafana-ui/src/components/Spinner/Spinner.story.tsx
View file @
165c3adf
...
...
@@ -4,7 +4,7 @@ import { storiesOf } from '@storybook/react';
import
{
withCenteredStory
}
from
'../../utils/storybook/withCenteredStory'
;
import
{
Spinner
}
from
'./Spinner'
;
const
story
=
storiesOf
(
'
UI
/Spinner'
,
module
);
const
story
=
storiesOf
(
'
General
/Spinner'
,
module
);
story
.
addDecorator
(
withCenteredStory
);
story
.
add
(
'spinner'
,
()
=>
{
return
(
...
...
packages/grafana-ui/src/components/StatsPicker/StatsPicker.story.tsx
View file @
165c3adf
...
...
@@ -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
.
add
(
'picker'
,
()
=>
{
const
{
placeholder
,
defaultStat
,
allowMultiple
,
initialStats
}
=
getKnobs
();
...
...
packages/grafana-ui/src/components/Switch/Switch.story.tsx
View file @
165c3adf
...
...
@@ -14,7 +14,7 @@ const getStory = (title: string, component: any) => ({
},
});
export
default
getStory
(
'
UI|
Switch'
,
Switch
);
export
default
getStory
(
'
General/
Switch'
,
Switch
);
const
getKnobs
=
()
=>
{
return
{
...
...
packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.story.tsx
View file @
165c3adf
...
...
@@ -6,7 +6,7 @@ import { action } from '@storybook/addon-actions';
import
{
DataFrame
}
from
'@grafana/data'
;
import
{
withCenteredStory
}
from
'../../utils/storybook/withCenteredStory'
;
const
TableInputStories
=
storiesOf
(
'
UI
/Table/Input'
,
module
);
const
TableInputStories
=
storiesOf
(
'
General
/Table/Input'
,
module
);
TableInputStories
.
addDecorator
(
withCenteredStory
);
...
...
packages/grafana-ui/src/components/Tabs/Tabs.story.tsx
View file @
165c3adf
...
...
@@ -6,7 +6,7 @@ import { Tab } from './Tab';
import
{
TabContent
}
from
'./TabContent'
;
export
default
{
title
:
'
UI
/Tabs/TabsExample'
,
title
:
'
General
/Tabs/TabsExample'
,
decorators
:
[
withCenteredStory
],
};
...
...
packages/grafana-ui/src/components/Tabs/TabsBar.story.tsx
View file @
165c3adf
...
...
@@ -7,7 +7,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import
mdx
from
'./TabsBar.mdx'
;
export
default
{
title
:
'
UI
/Tabs/TabsBar'
,
title
:
'
General
/Tabs/TabsBar'
,
component
:
TabsBar
,
decorators
:
[
withCenteredStory
],
parameters
:
{
...
...
packages/grafana-ui/src/components/TagsInput/TagsInput.story.tsx
View file @
165c3adf
...
...
@@ -5,7 +5,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import
{
UseState
}
from
'../../utils/storybook/UseState'
;
import
{
TagsInput
}
from
'./TagsInput'
;
const
TagsInputStories
=
storiesOf
(
'
UI
/TagsInput'
,
module
);
const
TagsInputStories
=
storiesOf
(
'
General
/TagsInput'
,
module
);
const
mockTags
=
[
'Some'
,
'Tags'
,
'With'
,
'This'
,
'New'
,
'Component'
];
TagsInputStories
.
addDecorator
(
withCenteredStory
);
...
...
packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.story.tsx
View file @
165c3adf
...
...
@@ -6,7 +6,7 @@ import { ThresholdsEditor } from './ThresholdsEditor';
import
{
getTheme
}
from
'../../themes'
;
import
{
ThresholdsMode
,
ThresholdsConfig
}
from
'@grafana/data'
;
const
ThresholdsEditorStories
=
storiesOf
(
'
UI
/ThresholdsEditor'
,
module
);
const
ThresholdsEditorStories
=
storiesOf
(
'
Panel
/ThresholdsEditor'
,
module
);
const
thresholds
:
ThresholdsConfig
=
{
mode
:
ThresholdsMode
.
Absolute
,
steps
:
[
...
...
packages/grafana-ui/src/components/TimePicker/TimeOfDayPicker.story.tsx
View file @
165c3adf
...
...
@@ -7,7 +7,7 @@ import { UseState } from '../../utils/storybook/UseState';
import
{
withCenteredStory
}
from
'../../utils/storybook/withCenteredStory'
;
import
{
dateTime
}
from
'@grafana/data'
;
const
TimeOfDayPickerStories
=
storiesOf
(
'
UI
/TimeOfDayPicker'
,
module
);
const
TimeOfDayPickerStories
=
storiesOf
(
'
General
/TimeOfDayPicker'
,
module
);
TimeOfDayPickerStories
.
addDecorator
(
withCenteredStory
);
...
...
packages/grafana-ui/src/components/TimePicker/TimePicker.story.tsx
View file @
165c3adf
...
...
@@ -7,7 +7,7 @@ import { UseState } from '../../utils/storybook/UseState';
import
{
withCenteredStory
}
from
'../../utils/storybook/withCenteredStory'
;
import
{
TimeFragment
,
dateTime
}
from
'@grafana/data'
;
const
TimePickerStories
=
storiesOf
(
'
UI
/TimePicker'
,
module
);
const
TimePickerStories
=
storiesOf
(
'
General
/TimePicker'
,
module
);
TimePickerStories
.
addDecorator
(
withCenteredStory
);
...
...
packages/grafana-ui/src/components/TimePicker/TimeZonePicker.story.tsx
View file @
165c3adf
...
...
@@ -6,7 +6,7 @@ import { TimeZonePicker } from './TimeZonePicker';
import
{
UseState
}
from
'../../utils/storybook/UseState'
;
import
{
withCenteredStory
}
from
'../../utils/storybook/withCenteredStory'
;
const
TimeZonePickerStories
=
storiesOf
(
'
UI
/TimeZonePicker'
,
module
);
const
TimeZonePickerStories
=
storiesOf
(
'
General
/TimeZonePicker'
,
module
);
TimeZonePickerStories
.
addDecorator
(
withCenteredStory
);
...
...
packages/grafana-ui/src/components/ToggleButtonGroup/ToggleButtonGroup.story.tsx
View file @
165c3adf
...
...
@@ -6,7 +6,7 @@ import { ToggleButton, ToggleButtonGroup } from './ToggleButtonGroup';
import
{
UseState
}
from
'../../utils/storybook/UseState'
;
import
{
withCenteredStory
}
from
'../../utils/storybook/withCenteredStory'
;
const
ToggleButtonGroupStories
=
storiesOf
(
'
UI
/ToggleButtonGroup'
,
module
);
const
ToggleButtonGroupStories
=
storiesOf
(
'
General
/ToggleButtonGroup'
,
module
);
const
options
=
[
{
value
:
'first'
,
label
:
'First'
},
...
...
packages/grafana-ui/src/components/UnitPicker/UnitPicker.story.tsx
View file @
165c3adf
...
...
@@ -5,7 +5,7 @@ import { UnitPicker } from './UnitPicker';
import
mdx
from
'./UnitPicker.mdx'
;
export
default
{
title
:
'
UI
/UnitPicker'
,
title
:
'
General
/UnitPicker'
,
component
:
UnitPicker
,
decorators
:
[
withCenteredStory
],
parameters
:
{
...
...
packages/grafana-ui/src/components/ValueMappingsEditor/ValueMappingsEditor.story.tsx
View file @
165c3adf
...
...
@@ -3,7 +3,7 @@ import { storiesOf } from '@storybook/react';
import
{
action
}
from
'@storybook/addon-actions'
;
import
{
ValueMappingsEditor
}
from
'./ValueMappingsEditor'
;
const
ValueMappingsEditorStories
=
storiesOf
(
'
UI
/ValueMappingsEditor'
,
module
);
const
ValueMappingsEditorStories
=
storiesOf
(
'
Panel
/ValueMappingsEditor'
,
module
);
ValueMappingsEditorStories
.
add
(
'default'
,
()
=>
{
return
<
ValueMappingsEditor
valueMappings=
{
[]
}
onChange=
{
action
(
'Mapping changed'
)
}
/>;
...
...
packages/grafana-ui/src/utils/useDelayedSwitch.story.tsx
View file @
165c3adf
...
...
@@ -19,7 +19,7 @@ function StoryWrapper() {
return
<
div
>
{
valueDelayed
?
'ON'
:
'OFF'
}
</
div
>;
}
const
story
=
storiesOf
(
'
Utils/
useDelayedSwitch'
,
module
);
const
story
=
storiesOf
(
'useDelayedSwitch'
,
module
);
story
.
addDecorator
(
withCenteredStory
);
story
.
add
(
'useDelayedSwitch'
,
()
=>
{
return
<
StoryWrapper
/>;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment