Skip to content

Commit

Permalink
Merge pull request #578 from Panenco/feat/loader-stories
Browse files Browse the repository at this point in the history
feat: loader stories
  • Loading branch information
vozbrann authored Feb 9, 2023
2 parents 7b989a8 + 12ff903 commit 95de6e3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/loader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import * as React from 'react';
import { StyledLoader } from './style';

export interface LoaderProps extends React.HTMLAttributes<HTMLDivElement> {
/**
* The color of the loader
* */
color?: string;
}

Expand Down
19 changes: 19 additions & 0 deletions stories/Loader/Loader.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as React from 'react';
import { ComponentStory, ComponentMeta } from '@storybook/react';
import { colors } from 'styles';
import { Loader } from 'components/loader';

export default {
title: 'Components/Loader',
component: Loader,
} as ComponentMeta<typeof Loader>;

const Template: ComponentStory<typeof Loader> = (args) => <Loader {...args} />;

export const Default = Template.bind({});
Default.args = {};

export const Color = Template.bind({});
Color.args = {
color: colors.success,
};

0 comments on commit 95de6e3

Please sign in to comment.