@@ -40,14 +40,12 @@ const insertBox = (e: any) => {
40
40
e . target . parentElement . insertAdjacentElement ( 'afterend' , div ) ;
41
41
} ;
42
42
43
- const createBox = ( vertical : boolean , index : number ) => html ` < div
44
- style ="position:relative; ">
43
+ const createBox = ( vertical : boolean ) => html ` < div style ="position:relative; ">
45
44
< div
46
45
style ="
47
46
${ vertical
48
47
? 'display: grid; grid-template-columns: 1fr auto'
49
48
: 'display:block;' }
50
- ${ index % 2 === 0 ? 'background-color:lightgrey;' : '' }
51
49
">
52
50
< div style ="padding: 10px; white-space: nowrap; ">
53
51
${ GetRandomUmbracoWord ( ) }
@@ -62,18 +60,38 @@ const createBox = (vertical: boolean, index: number) => html` <div
62
60
const createBoxes = ( count : Number , vertical = false ) => {
63
61
const boxes : TemplateResult < 1 > [ ] = [ ] ;
64
62
for ( let index = 0 ; index < count ; index ++ ) {
65
- boxes . push ( createBox ( vertical , index ) ) ;
63
+ boxes . push ( createBox ( vertical ) ) ;
66
64
}
67
65
return boxes ;
68
66
} ;
69
67
70
68
export const AAAOverview : Story = ( ) =>
71
- html `< uui-button-inline-create
72
- label ="Create Item "> </ uui-button-inline-create > ` ;
69
+ html ` < h3 > Hover between list items to show the button.</ h3 >
70
+ < div id ="container " style ="max-width: 500px; border: 1px solid grey ">
71
+ ${ createBoxes ( 5 ) }
72
+ </ div > ` ;
73
73
AAAOverview . storyName = 'Overview' ;
74
+ AAAOverview . parameters = {
75
+ docs : {
76
+ source : {
77
+ code : `
78
+ <div>
79
+ <div style="padding: 10px;">Item 1</div>
80
+ <uui-button-inline-create label="Create Item"></uui-button-inline-create>
81
+ <div style="padding: 10px;">Item 2</div>
82
+ <uui-button-inline-create label="Create Item"></uui-button-inline-create>
83
+ <div style="padding: 10px;">Item 3</div>
84
+ <uui-button-inline-create label="Create Item"></uui-button-inline-create>
85
+ </div>
86
+ ` ,
87
+ } ,
88
+ } ,
89
+ } ;
74
90
75
91
export const Vertical : Story = ( ) =>
76
- html `< div id ="container " style ="max-width: 500px "> ${ createBoxes ( 5 ) } </ div > ` ;
92
+ html `< div id ="container " style ="max-width: 500px; border: 1px solid grey ">
93
+ ${ createBoxes ( 5 ) }
94
+ </ div > ` ;
77
95
78
96
Vertical . parameters = {
79
97
docs : {
@@ -93,7 +111,7 @@ Vertical.parameters = {
93
111
} ;
94
112
95
113
export const Horizontal : Story = ( ) =>
96
- html `< div id ="container-vertical " style ="display: flex; ">
114
+ html `< div id ="container-vertical " style ="display: flex ">
97
115
${ createBoxes ( 5 , true ) }
98
116
</ div > ` ;
99
117
0 commit comments