2022-03-08 11:50:34 +01:00
|
|
|
import { Meta, Story } from "@storybook/angular";
|
|
|
|
|
|
|
|
import { BadgeComponent } from "./badge.component";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
title: "Jslib/Badge",
|
|
|
|
component: BadgeComponent,
|
|
|
|
args: {
|
|
|
|
type: "primary",
|
|
|
|
},
|
|
|
|
} as Meta;
|
|
|
|
|
|
|
|
const Template: Story<BadgeComponent> = (args: BadgeComponent) => ({
|
|
|
|
props: args,
|
|
|
|
template: `
|
2022-03-11 21:00:24 +01:00
|
|
|
<span class="tw-text-main">Span </span><span bit-badge [badgeType]="type">Badge</span>
|
|
|
|
<br><br>
|
|
|
|
<span class="tw-text-main">Link </span><a href="#" bit-badge [badgeType]="type">Badge</a>
|
|
|
|
<br><br>
|
|
|
|
<span class="tw-text-main">Button </span><button bit-badge [badgeType]="type">Badge</button>
|
2022-03-08 11:50:34 +01:00
|
|
|
`,
|
|
|
|
});
|
|
|
|
|
|
|
|
export const Primary = Template.bind({});
|
|
|
|
Primary.args = {};
|
|
|
|
|
|
|
|
export const Secondary = Template.bind({});
|
|
|
|
Secondary.args = {
|
|
|
|
type: "secondary",
|
|
|
|
};
|
|
|
|
|
|
|
|
export const Success = Template.bind({});
|
|
|
|
Success.args = {
|
|
|
|
type: "success",
|
|
|
|
};
|
|
|
|
|
|
|
|
export const Danger = Template.bind({});
|
|
|
|
Danger.args = {
|
|
|
|
type: "danger",
|
|
|
|
};
|
|
|
|
|
|
|
|
export const Warning = Template.bind({});
|
|
|
|
Warning.args = {
|
|
|
|
type: "warning",
|
|
|
|
};
|
|
|
|
|
|
|
|
export const Info = Template.bind({});
|
|
|
|
Info.args = {
|
|
|
|
type: "info",
|
|
|
|
};
|