Unverified Commit 5ae93eb4 authored by Marcos Iglesias's avatar Marcos Iglesias Committed by GitHub

Adds stories for LoadingSpinner and InfoButton (#623)

Signed-off-by: 's avatarMarcos Iglesias Valle <golodhros@gmail.com>
parent 58da1550
import React from 'react';
import { storiesOf } from '@storybook/react';
import StorySection from '../StorySection';
import InfoButton from '.';
const stories = storiesOf('Components/Buttons', module);
stories.add('Info Button', () => (
<>
<StorySection title="Info Button">
<InfoButton infoText="Some info text to share" title="Popover Title" />
</StorySection>
<StorySection title="Info Button to left">
<InfoButton
infoText="Some info text to share"
title="Popover Title"
placement="left"
size="size"
/>
</StorySection>
<StorySection title="Info Button small size">
<InfoButton
infoText="Some info text to share"
title="Popover Title"
placement="left"
size="small"
/>
</StorySection>
</>
));
...@@ -2,18 +2,15 @@ ...@@ -2,18 +2,15 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import * as React from 'react'; import * as React from 'react';
import './styles.scss'; import './styles.scss';
class LoadingSpinner extends React.Component { const LoadingSpinner: React.FC = () => (
render() { <img
return ( src="/static/images/loading_spinner.gif"
<img alt="loading..."
src="/static/images/loading_spinner.gif" className="loading-spinner"
alt="loading..." />
className="loading-spinner" );
/>
);
}
}
export default LoadingSpinner; export default LoadingSpinner;
import React from 'react';
import { storiesOf } from '@storybook/react';
import StorySection from '../StorySection';
import LoadingSpinner from '.';
const stories = storiesOf('Attributes/States', module);
stories.add('Loading Spinner', () => (
<>
<StorySection title="Loading Spinner">
<LoadingSpinner />
</StorySection>
</>
));
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import * as React from 'react'; import * as React from 'react';
import Pagination from 'react-js-pagination';
import ResourceListItem from 'components/common/ResourceListItem'; import ResourceListItem from 'components/common/ResourceListItem';
import { Resource } from 'interfaces'; import { Resource } from 'interfaces';
import * as Constants from './constants'; import * as Constants from './constants';
......
...@@ -4,7 +4,7 @@ import { storiesOf } from '@storybook/react'; ...@@ -4,7 +4,7 @@ import { storiesOf } from '@storybook/react';
import StorySection from '../StorySection'; import StorySection from '../StorySection';
import { AlertIcon } from '.'; import { AlertIcon } from '.';
const stories = storiesOf('Attributes/Icons', module); const stories = storiesOf('Attributes/Iconography', module);
stories.add('SVG Icons', () => ( stories.add('SVG Icons', () => (
<> <>
......
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