Commit fa7c4d91 by Karine Valença Committed by GitHub

Docs: Storybook - Spinner (#26754)

* add docs for spinner component

* fix lint

* Code review fixes
parent 41f7bccb
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
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>
);
};
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