Skip to content

Commit

Permalink
Merge pull request #71 from mouracamila/badge-stories
Browse files Browse the repository at this point in the history
chore: badge stories
  • Loading branch information
bacali95 authored Apr 29, 2022
2 parents ffdd963 + 386b048 commit 0b6bb5f
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/components/Badge/Badge.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Meta, Story } from '@storybook/react/types-6-0';
import { HiCheck } from 'react-icons/hi';

import { Badge, BadgeProps } from '.';

Expand All @@ -7,10 +8,29 @@ export default {
component: Badge,
} as Meta;

const Template: Story<BadgeProps> = (args) => <Badge {...args} />;
const Template: Story<BadgeProps> = (args) => (
<div className="flex items-center">
<Badge {...args} />
</div>
);

export const DefaultBadge = Template.bind({});
DefaultBadge.storyName = 'Default';
DefaultBadge.args = {
children: 'Default',
};

export const BadgeWithIcon = Template.bind({});
BadgeWithIcon.storyName = 'Badge with icon';
BadgeWithIcon.args = {
color: 'indigo',
icon: HiCheck,
children: '2 minutes ago',
};

export const BadgeOnlyIcon = Template.bind({});
BadgeOnlyIcon.storyName = 'Badge only icon';
BadgeOnlyIcon.args = {
color: 'green',
icon: HiCheck,
};

0 comments on commit 0b6bb5f

Please sign in to comment.