-
Notifications
You must be signed in to change notification settings - Fork 47
/
card.component.stories.ts
91 lines (88 loc) · 3.33 KB
/
card.component.stories.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import { Story, Meta } from '@storybook/angular';
import { moduleMetadata, componentWrapperDecorator } from '@storybook/angular';
import { CardComponent } from './card.component';
import { AgModule } from './ag.module';
export default {
title: 'AG—Angular (Beta)/Card',
component: CardComponent,
decorators: [
// Cannot get preview.js or global decorator solutions to work.
// https://storybook.js.org/tutorials/intro-to-storybook/angular/en/composite-component/
componentWrapperDecorator(
(story) =>
`<div style="font-family: var(--agnostic-font-family-body); line-height: 1.4; font-size: var(--agnostic-body);">${story}</div>`
),
moduleMetadata({
imports: [AgModule],
}),
],
} as Meta;
const Template: Story<CardComponent> = (args: CardComponent) => ({
template: `
<ag-card>
<div style="padding: 24px;">Default</div>
<div style="padding: 24px;">Card</div>
</ag-card>
<div class="mbe24"></div>
<ag-card [isBorder]="true">
<div style="padding: 24px;">Border</div>
<div style="padding: 24px;">Card</div>
</ag-card>
<div class="mbe24"></div>
<ag-card [isBorder]="true" [isRounded]="true">
<div style="padding: 24px;">Border and rounded</div>
<div style="padding: 24px;">Card</div>
</ag-card>
<div class="mbe24"></div>
<ag-card [isStacked]="true" [isBorder]="true">
<div style="padding: 24px;">Stacked and border</div>
<div style="padding: 24px;">Card</div>
</ag-card>
<div class="mbe24"></div>
<ag-card [isStacked]="true" [isShadow]="true">
<div style="padding: 24px;">Stacked and shadow</div>
<div style="padding: 24px;">Card</div>
</ag-card>
<div class="mbe24"></div>
<ag-card [isStacked]="true" [isShadow]="true" [isAnimated]="true">
<div style="padding: 24px;">Stacked, shadown, and animated</div>
<div style="padding: 24px;">Card</div>
</ag-card>
<div class="mbe24"></div>
<ag-card type="success" [isStacked]="true">
<div style="padding: 24px;">Success stacked</div>
<div style="padding: 24px;">Card</div>
</ag-card>
<div class="mbe24"></div>
<ag-card type="success" [isStacked]="true" [isRounded]="true">
<div style="padding: 24px;">Success, stacked, and rounded</div>
<div style="padding: 24px;">Card</div>
</ag-card>
<div class="mbe24"></div>
<ag-card type="info" [isStacked]="true">
<div style="padding: 24px;">Info and stacked</div>
<div style="padding: 24px;">Card</div>
</ag-card>
<div class="mbe24"></div>
<ag-card type="warning" [isStacked]="true">
<div style="padding: 24px;">Warning and stacked</div>
<div style="padding: 24px;">Card</div>
</ag-card>
<div class="mbe24"></div>
<ag-card type="error" [isStacked]="true">
<div style="padding: 24px;">Error and stacked</div>
<div style="padding: 24px;">Card</div>
</ag-card>
<div class="mbe24"></div>
<ag-card [isSkinned]="false">
<div style="padding: 24px;">Base Card</div>
<div style="padding: 24px;">No Skin</div>
</ag-card>
<div class="mbe24"></div>
<ag-card css="addition-classes">
<div style="padding: 24px;">Custom CSS Class Overrides</div>
<div style="padding: 24px;">Inspect to see additional-classes</div>
</ag-card>
`,
});
export const TabsAll = Template.bind({});