@@ -2,7 +2,7 @@ import { storiesOf, moduleMetadata } from "@storybook/angular";
22import { select , withKnobs } from "@storybook/addon-knobs/angular" ;
33import { action } from "@storybook/addon-actions" ;
44
5- import { TilesModule } from "../" ;
5+ import { TilesModule } from "../tiles/tiles.module " ;
66import { SkeletonModule } from "../skeleton/index" ;
77import { RouterModule } from "@angular/router" ;
88import { APP_BASE_HREF } from "@angular/common" ;
@@ -72,17 +72,20 @@ storiesOf("Components|Tiles", module)
7272 . add ( "Multiple" , ( ) => ( {
7373 template : `
7474 <div style="display: flex; flex-flow: row wrap; justify-content: space-around;">
75- <ibm-tile>
75+ <ibm-tile [theme]="theme" >
7676 Tile 1
7777 </ibm-tile>
78- <ibm-tile>
78+ <ibm-tile [theme]="theme" >
7979 Tile 2
8080 </ibm-tile>
81- <ibm-tile>
81+ <ibm-tile [theme]="theme" >
8282 Tile 3
8383 </ibm-tile>
8484 </div>
85- `
85+ ` ,
86+ props : {
87+ theme : select ( "theme" , [ "dark" , "light" ] , "dark" )
88+ }
8689 } ) )
8790 . add ( "Clickable" , ( ) => ( {
8891 template : `
@@ -96,21 +99,27 @@ storiesOf("Components|Tiles", module)
9699 Edit on Carbon UI Builder
97100 </a>
98101 <br><br>
99- <ibm-clickable-tile href="https://www.carbondesignsystem.com/" target="_blank">
102+ <ibm-clickable-tile href="https://www.carbondesignsystem.com/" target="_blank" [theme]="theme" >
100103 Click the tile to open the Carbon Design System
101104 </ibm-clickable-tile>
102- `
105+ ` ,
106+ props : {
107+ theme : select ( "theme" , [ "dark" , "light" ] , "dark" )
108+ }
103109 } ) )
104110 . add ( "Routable" , ( ) => ( {
105111 template : `
106- <ibm-clickable-tile [route]="['foo']">
112+ <ibm-clickable-tile [route]="['foo']" [theme]="theme" >
107113 Click to trigger the <code>foo</code> route
108114 </ibm-clickable-tile>
109- <ibm-clickable-tile [route]="['bar']">
115+ <ibm-clickable-tile [route]="['bar']" [theme]="theme" >
110116 Click to trigger the <code>bar</code> route
111117 </ibm-clickable-tile>
112118 <router-outlet></router-outlet>
113- `
119+ ` ,
120+ props : {
121+ theme : select ( "theme" , [ "dark" , "light" ] , "dark" )
122+ }
114123 } ) )
115124 . add ( "Selectable" , ( ) => ( {
116125 template : `
@@ -126,13 +135,14 @@ storiesOf("Components|Tiles", module)
126135 </a>
127136 <br><br>
128137 <ibm-tile-group (selected)="selected($event)" [multiple]="false">
129- <ibm-selection-tile value="tile1" [selected]="true">Selectable Tile</ibm-selection-tile>
130- <ibm-selection-tile value="tile2">Selectable Tile</ibm-selection-tile>
131- <ibm-selection-tile value="tile3">Selectable Tile</ibm-selection-tile>
138+ <ibm-selection-tile value="tile1" [selected]="true" [theme]="theme" >Selectable Tile</ibm-selection-tile>
139+ <ibm-selection-tile value="tile2" [theme]="theme" >Selectable Tile</ibm-selection-tile>
140+ <ibm-selection-tile value="tile3" [theme]="theme" >Selectable Tile</ibm-selection-tile>
132141 </ibm-tile-group>
133142 ` ,
134143 props : {
135- selected : action ( "tile selected" )
144+ selected : action ( "tile selected" ) ,
145+ theme : select ( "theme" , [ "dark" , "light" ] , "dark" )
136146 }
137147 } ) )
138148 . add ( "Multi-select" , ( ) => ( {
@@ -162,13 +172,14 @@ storiesOf("Components|Tiles", module)
162172 </a>
163173 <br><br>
164174 <ibm-tile-group (selected)="selected($event)" [multiple]="true">
165- <ibm-selection-tile value="tile1" [selected]="true">Selectable Tile</ibm-selection-tile>
166- <ibm-selection-tile value="tile2">Selectable Tile</ibm-selection-tile>
167- <ibm-selection-tile value="tile3">Selectable Tile</ibm-selection-tile>
175+ <ibm-selection-tile value="tile1" [selected]="true" [theme]="theme" >Selectable Tile</ibm-selection-tile>
176+ <ibm-selection-tile value="tile2" [theme]="theme" >Selectable Tile</ibm-selection-tile>
177+ <ibm-selection-tile value="tile3" [theme]="theme" >Selectable Tile</ibm-selection-tile>
168178 </ibm-tile-group>
169179 ` ,
170180 props : {
171- selected : action ( "tile selected" )
181+ selected : action ( "tile selected" ) ,
182+ theme : select ( "theme" , [ "dark" , "light" ] , "dark" )
172183 }
173184 } ) )
174185 . add ( "Expandable" , ( ) => ( {
@@ -187,11 +198,14 @@ storiesOf("Components|Tiles", module)
187198 Edit on Carbon UI Builder
188199 </a>
189200 <br><br>
190- <ibm-expandable-tile>
201+ <ibm-expandable-tile [theme]="theme" >
191202 <span class="bx--tile-content__above-the-fold" style="height: 200px">Above the fold content here</span>
192203 <span class="bx--tile-content__below-the-fold" style="height: 400px">Below the fold content here</span>
193204 </ibm-expandable-tile>
194- `
205+ ` ,
206+ props : {
207+ theme : select ( "theme" , [ "dark" , "light" ] , "dark" )
208+ }
195209 } ) )
196210 . add ( "Skeleton" , ( ) => ( {
197211 template : `
0 commit comments