-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRecipeList.stories.js
141 lines (133 loc) · 4.62 KB
/
RecipeList.stories.js
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
// RecipeList.stories.js
import { html } from 'lit-html'
import(
'../../web-components-toolbox/src/es/components/atoms/input/Input'
).then((module) => self.customElements.define('a-input', module.default))
import(
'../../web-components-toolbox/src/es/components/atoms/button/Button'
).then((module) => self.customElements.define('a-button', module.default))
import(
'../../web-components-toolbox/src/es/components/molecules/pagination/Pagination'
).then((module) => self.customElements.define('m-pagination', module.default))
import(
'../../web-components-toolbox/src/es/components/molecules/recipeList/RecipeList'
).then((module) => self.customElements.define('m-recipe-list', module.default))
import(
'../../web-components-toolbox/src/es/components/molecules/tagFilter/TagFilter'
).then((module) => self.customElements.define('m-tag-filter', module.default))
import(
'../../web-components-toolbox/src/es/components/organisms/grid/Grid'
).then((module) => self.customElements.define('o-grid', module.default))
export default {
title: 'Molecules/RecipeList',
component: 'm-recipe-list'
}
export const Default = () =>
html`
<a-input
inputid="inputSearch"
placeholder="Suchen..."
submit-search="request-list-recipe"
search=""
type="search"
any-key-listener
change-listener
delete-listener
answer-event-name="list-recipe"
active-detail-property-name="fetch:searchTerm"
></a-input>
<o-grid
namespace="grid-2colums2rows-"
first-container-vertical
first-column-with="20%"
>
<section>
<m-tag-filter namespace="tag-filter-vertical-">
<a-button
namespace="button-category-"
tag="Drinks"
answer-event-name="list-recipe"
request-event-name="request-list-recipe"
active-detail-property-name="fetch:tag"
>Getränke</a-button
>
<a-button
namespace="button-category-"
tag="Appetizers"
answer-event-name="list-recipe"
request-event-name="request-list-recipe"
active-detail-property-name="fetch:tag"
>Vorspeisen</a-button
>
<a-button
namespace="button-category-"
tag="MainDishes"
answer-event-name="list-recipe"
request-event-name="request-list-recipe"
active-detail-property-name="fetch:tag"
>Hauptgerichte</a-button
>
<a-button
namespace="button-category-"
tag="DessertsAndBaking"
answer-event-name="list-recipe"
request-event-name="request-list-recipe"
active-detail-property-name="fetch:tag"
>Dessert & Backen</a-button
>
<a-button
namespace="button-category-"
tag="DIY"
answer-event-name="list-recipe"
request-event-name="request-list-recipe"
active-detail-property-name="fetch:tag"
>DIY</a-button
>
</m-tag-filter>
<o-grid namespace="grid-2colums2rows-" first-container-horizontal>
<m-tag-filter
namespace="tag-filter-horizontal-"
answer-event-name="list-recipe"
request-event-name="request-list-recipe"
>
<a-button
namespace="button-category-"
tag="vegetarisch"
answer-event-name="list-recipe"
request-event-name="request-list-recipe"
active-detail-property-name="fetch:tag"
>Vegetarisch</a-button
>
<a-button
namespace="button-category-"
tag="glut"
answer-event-name="list-recipe"
request-event-name="request-list-recipe"
active-detail-property-name="fetch:tag"
>Glutenfrei</a-button
>
<a-button
namespace="button-category-"
tag="vegan"
answer-event-name="list-recipe"
request-event-name="request-list-recipe"
active-detail-property-name="fetch:tag"
>Vegan</a-button
>
</m-tag-filter>
<m-pagination
answer-event-name="list-recipe"
request-event-name="request-list-recipe"
namespace="pagination-default-"
compact
></m-pagination>
</o-grid>
<m-recipe-list
answer-event-name="list-recipe"
request-event-name="request-list-recipe"
namespace="recipe-list-default-"
>
</m-recipe-list>
</section>
</o-grid>
`