bitwarden-estensione-browser/libs/components/src/badge/badge.stories.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
1.3 KiB
TypeScript
Raw Normal View History

2022-03-08 11:50:34 +01:00
import { Meta, Story } from "@storybook/angular";
import { BadgeDirective } from "./badge.directive";
2022-03-08 11:50:34 +01:00
export default {
2022-06-17 16:23:04 +02:00
title: "Component Library/Badge",
component: BadgeDirective,
2022-03-08 11:50:34 +01:00
args: {
badgeType: "primary",
2022-03-08 11:50:34 +01:00
},
2022-04-08 17:47:32 +02:00
parameters: {
design: {
type: "figma",
url: "https://www.figma.com/file/f32LSg3jaegICkMu7rPARm/Tailwind-Component-Library-Update?node-id=1881%3A16956",
},
},
2022-03-08 11:50:34 +01:00
} as Meta;
const Template: Story<BadgeDirective> = (args: BadgeDirective) => ({
2022-03-08 11:50:34 +01:00
props: args,
template: `
<span class="tw-text-main">Span </span><span bitBadge [badgeType]="badgeType">Badge</span>
<br><br>
<span class="tw-text-main">Link </span><a href="#" bitBadge [badgeType]="badgeType">Badge</a>
<br><br>
<span class="tw-text-main">Button </span><button bitBadge [badgeType]="badgeType">Badge</button>
2022-03-08 11:50:34 +01:00
`,
});
export const Primary = Template.bind({});
Primary.args = {};
export const Secondary = Template.bind({});
Secondary.args = {
badgeType: "secondary",
2022-03-08 11:50:34 +01:00
};
export const Success = Template.bind({});
Success.args = {
badgeType: "success",
2022-03-08 11:50:34 +01:00
};
export const Danger = Template.bind({});
Danger.args = {
badgeType: "danger",
2022-03-08 11:50:34 +01:00
};
export const Warning = Template.bind({});
Warning.args = {
badgeType: "warning",
2022-03-08 11:50:34 +01:00
};
export const Info = Template.bind({});
Info.args = {
badgeType: "info",
2022-03-08 11:50:34 +01:00
};