@@ -9,23 +9,24 @@ export default {
9
9
id : 'uui-ref-node' ,
10
10
title : 'Displays/References/Node' ,
11
11
component : 'uui-ref-node' ,
12
+ decorators : [
13
+ ( Story : any ) => html `< div style ="max-width: 420px; "> ${ Story ( ) } </ div > ` ,
14
+ ] ,
12
15
} ;
13
16
14
17
const Template : Story = props => html `
15
- < div style ="max-width: 420px; ">
16
- < uui-ref-node
17
- name ="${ props . name } "
18
- detail ="${ props . detail } "
19
- ?selectable =${ props . selectable }
20
- ?selectOnly =${ props . selectOnly }
21
- ?error=${ props . error }
22
- ?disabled=${ props . disabled } >
23
- < uui-tag size ="s " slot ="tag " look ="positive "> Published</ uui-tag >
24
- < uui-action-bar slot ="actions "
25
- > < uui-button > < uui-icon name ="delete "> </ uui-icon > </ uui-button
26
- > </ uui-action-bar >
27
- </ uui-ref-node >
28
- </ div >
18
+ < uui-ref-node
19
+ name ="${ props . name } "
20
+ detail ="${ props . detail } "
21
+ ?selectable =${ props . selectable }
22
+ ?selectOnly =${ props . selectOnly }
23
+ ?error=${ props . error }
24
+ ?disabled=${ props . disabled } >
25
+ < uui-tag size ="s " slot ="tag " look ="positive "> Published</ uui-tag >
26
+ < uui-action-bar slot ="actions "
27
+ > < uui-button > < uui-icon name ="delete "> </ uui-icon > </ uui-button
28
+ > </ uui-action-bar >
29
+ </ uui-ref-node >
29
30
` ;
30
31
31
32
export const AAAOverview = Template . bind ( { } ) ;
@@ -52,16 +53,14 @@ AAAOverview.parameters = {
52
53
} ;
53
54
54
55
export const CustomIcon : Story = ( ) => html `
55
- < div style ="max-width: 420px; ">
56
- < uui-ref-node-data-type
57
- name ="Rabbit Suit Product Page "
58
- detail ="path/to/nowhere ">
59
- < uui-icon slot ="icon " name ="shopping-basket-alt "> </ uui-icon >
60
- < uui-action-bar slot ="actions ">
61
- < uui-button label ="Remove "> Remove</ uui-button >
62
- </ uui-action-bar >
63
- </ uui-ref-node-data-type >
64
- </ div >
56
+ < uui-ref-node-data-type
57
+ name ="Rabbit Suit Product Page "
58
+ detail ="path/to/nowhere ">
59
+ < uui-icon slot ="icon " name ="shopping-basket-alt "> </ uui-icon >
60
+ < uui-action-bar slot ="actions ">
61
+ < uui-button label ="Remove "> Remove</ uui-button >
62
+ </ uui-action-bar >
63
+ </ uui-ref-node-data-type >
65
64
` ;
66
65
67
66
CustomIcon . parameters = {
@@ -82,19 +81,14 @@ CustomIcon.parameters = {
82
81
} ;
83
82
84
83
export const Border : Story = ( ) => html `
85
- < div style ="max-width: 420px; ">
86
- < uui-ref-node
87
- border
88
- name ="Rabbit Suit Product Page "
89
- detail ="path/to/nowhere ">
90
- < uui-tag size ="s " slot ="tag " look ="positive "> Published</ uui-tag >
91
- < uui-action-bar slot ="actions ">
92
- < uui-button type ="button " label ="Delete "
93
- > < uui-icon name ="delete "> </ uui-icon
94
- > </ uui-button >
95
- </ uui-action-bar >
96
- </ uui-ref-node >
97
- </ div >
84
+ < uui-ref-node border name ="Rabbit Suit Product Page " detail ="path/to/nowhere ">
85
+ < uui-tag size ="s " slot ="tag " look ="positive "> Published</ uui-tag >
86
+ < uui-action-bar slot ="actions ">
87
+ < uui-button type ="button " label ="Delete "
88
+ > < uui-icon name ="delete "> </ uui-icon
89
+ > </ uui-button >
90
+ </ uui-action-bar >
91
+ </ uui-ref-node >
98
92
` ;
99
93
100
94
Border . parameters = {
@@ -116,19 +110,17 @@ Border.parameters = {
116
110
} ;
117
111
118
112
export const Selectable : Story = props => html `
119
- < div style ="max-width: 420px; ">
120
- < uui-ref-node
121
- ?selectable ="${ props . selectable } "
122
- name ="Rabbit Suit Product Page "
123
- detail ="path/to/nowhere ">
124
- < uui-tag size ="s " slot ="tag " look ="positive "> Published</ uui-tag >
125
- < uui-action-bar slot ="actions ">
126
- < uui-button type ="button " label ="Delete "
127
- > < uui-icon name ="delete "> </ uui-icon
128
- > </ uui-button >
129
- </ uui-action-bar >
130
- </ uui-ref-node >
131
- </ div >
113
+ < uui-ref-node
114
+ ?selectable ="${ props . selectable } "
115
+ name ="Rabbit Suit Product Page "
116
+ detail ="path/to/nowhere ">
117
+ < uui-tag size ="s " slot ="tag " look ="positive "> Published</ uui-tag >
118
+ < uui-action-bar slot ="actions ">
119
+ < uui-button type ="button " label ="Delete "
120
+ > < uui-icon name ="delete "> </ uui-icon
121
+ > </ uui-button >
122
+ </ uui-action-bar >
123
+ </ uui-ref-node >
132
124
` ;
133
125
134
126
Selectable . args = {
@@ -154,19 +146,17 @@ Selectable.parameters = {
154
146
} ;
155
147
156
148
export const Disabled : Story = props => html `
157
- < div style ="max-width: 420px; ">
158
- < uui-ref-node
159
- ?disabled ="${ props . disabled } "
160
- name ="Rabbit Suit Product Page "
161
- detail ="path/to/nowhere ">
162
- < uui-tag size ="s " slot ="tag " look ="positive "> Published</ uui-tag >
163
- < uui-action-bar slot ="actions ">
164
- < uui-button type ="button " label ="Delete "
165
- > < uui-icon name ="delete "> </ uui-icon
166
- > </ uui-button >
167
- </ uui-action-bar >
168
- </ uui-ref-node >
169
- </ div >
149
+ < uui-ref-node
150
+ ?disabled ="${ props . disabled } "
151
+ name ="Rabbit Suit Product Page "
152
+ detail ="path/to/nowhere ">
153
+ < uui-tag size ="s " slot ="tag " look ="positive "> Published</ uui-tag >
154
+ < uui-action-bar slot ="actions ">
155
+ < uui-button type ="button " label ="Delete "
156
+ > < uui-icon name ="delete "> </ uui-icon
157
+ > </ uui-button >
158
+ </ uui-action-bar >
159
+ </ uui-ref-node >
170
160
` ;
171
161
172
162
Disabled . args = {
@@ -193,7 +183,7 @@ Disabled.parameters = {
193
183
194
184
const listOfNodeNames : string [ ] = ArrayOfUmbracoWords ( 10 ) ;
195
185
export const Listed : Story = ( ) => html `
196
- < uui-ref-list style =" max-width: 420px; " >
186
+ < uui-ref-list >
197
187
${ listOfNodeNames . map (
198
188
name => html `< uui-ref-node name =${ name } detail ="path/to/nowhere">
199
189
< uui-tag size ="s " slot ="tag " look ="positive "> Published</ uui-tag >
0 commit comments