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
fa7c4d91
Unverified
Commit
fa7c4d91
authored
Aug 03, 2020
by
Karine Valença
Committed by
GitHub
Aug 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs: Storybook - Spinner (#26754)
* add docs for spinner component * fix lint * Code review fixes
parent
41f7bccb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
1 deletions
+39
-1
packages/grafana-ui/src/components/Spinner/Spinner.mdx
+18
-0
packages/grafana-ui/src/components/Spinner/Spinner.story.tsx
+21
-1
No files found.
packages/grafana-ui/src/components/Spinner/Spinner.mdx
0 → 100644
View file @
fa7c4d91
import { Meta, Story, Preview, Props } from '@storybook/addon-docs/blocks';
import { Spinner } from './Spinner';
<Meta title="MDX|Spinner" component={Spinner} />
# Spinner
Spinner is `fa-spinner` icon animated. It is used to alert a user to wait for an activity to complete.
<Preview>
<div>
<Spinner />
<Spinner className="my-spin-div" iconClassName="my-spinner-classname" size={24}/>
</div>
</Preview>
<Props of={Spinner} />
\ No newline at end of file
packages/grafana-ui/src/components/Spinner/Spinner.story.tsx
View file @
fa7c4d91
import
React
from
'react'
;
import
{
number
,
color
}
from
'@storybook/addon-knobs'
;
import
{
withCenteredStory
}
from
'../../utils/storybook/withCenteredStory'
;
import
{
Spinner
}
from
'@grafana/ui'
;
import
mdx
from
'./Spinner.mdx'
;
export
default
{
title
:
'Visualizations/Spinner'
,
component
:
Spinner
,
decorators
:
[
withCenteredStory
],
parameters
:
{
docs
:
{
page
:
mdx
,
},
},
};
export
const
basic
=
()
=>
{
...
...
@@ -16,3 +22,17 @@ export const basic = () => {
</
div
>
);
};
export
const
withStyle
=
()
=>
{
return
(
<
div
>
<
Spinner
style=
{
{
backgroundColor
:
color
(
'White'
,
'white'
),
color
:
color
(
'Red'
,
'red'
),
}
}
size=
{
number
(
'Size'
,
34
)
}
/>
</
div
>
);
};
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