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
11188b53
Commit
11188b53
authored
Mar 09, 2019
by
ryan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor storybook cleanup
parent
f9e3c33e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
20 deletions
+13
-20
packages/grafana-ui/src/components/ColorPicker/NamedColorsPalette.story.tsx
+2
-2
packages/grafana-ui/src/components/DeleteButton/DeleteButton.story.tsx
+11
-18
No files found.
packages/grafana-ui/src/components/ColorPicker/NamedColorsPalette.story.tsx
View file @
11188b53
...
...
@@ -8,7 +8,7 @@ import { renderComponentWithTheme } from '../../utils/storybook/withTheme';
import
{
UseState
}
from
'../../utils/storybook/UseState'
;
const
BasicGreen
=
getColorDefinitionByName
(
'green'
);
const
Basic
Blue
=
getColorDefinitionByName
(
'blue
'
);
const
Basic
Red
=
getColorDefinitionByName
(
'red
'
);
const
LightBlue
=
getColorDefinitionByName
(
'light-blue'
);
const
NamedColorsPaletteStories
=
storiesOf
(
'UI/ColorPicker/Palettes/NamedColorsPalette'
,
module
);
...
...
@@ -41,7 +41,7 @@ NamedColorsPaletteStories.add('Named colors swatch - support for named colors',
'Selected color'
,
{
Green
:
BasicGreen
.
variants
.
dark
,
Red
:
Basic
Blue
.
variants
.
dark
,
Red
:
Basic
Red
.
variants
.
dark
,
'Light blue'
:
LightBlue
.
variants
.
dark
,
},
'red'
...
...
packages/grafana-ui/src/components/DeleteButton/DeleteButton.story.tsx
View file @
11188b53
import
React
,
{
FunctionComponent
}
from
'react'
;
import
React
from
'react'
;
import
{
storiesOf
}
from
'@storybook/react'
;
import
{
DeleteButton
}
from
'./DeleteButton'
;
const
CenteredStory
:
FunctionComponent
<
{}
>
=
({
children
})
=>
{
return
(
<
div
style=
{
{
height
:
'100vh '
,
display
:
'flex'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
}
}
>
{
children
}
</
div
>
);
};
import
{
withCenteredStory
}
from
'../../utils/storybook/withCenteredStory'
;
import
{
action
}
from
'@storybook/addon-actions'
;
storiesOf
(
'UI/DeleteButton'
,
module
)
.
addDecorator
(
story
=>
<
CenteredStory
>
{
story
()
}
</
CenteredStory
>
)
.
addDecorator
(
withCenteredStory
)
.
add
(
'default'
,
()
=>
{
return
<
DeleteButton
onConfirm=
{
()
=>
{}
}
/>;
return
(
<
DeleteButton
onConfirm=
{
()
=>
{
action
(
'Delete Confirmed'
)(
'delete!'
);
}
}
/>
);
});
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