11import { storiesOf , moduleMetadata } from "@storybook/angular" ;
2- import { select , withKnobs } from "@storybook/addon-knobs/angular" ;
2+ import { select , withKnobs , boolean } from "@storybook/addon-knobs/angular" ;
33import { action } from "@storybook/addon-actions" ;
44
55import { TilesModule } from "../tiles/tiles.module" ;
@@ -99,26 +99,28 @@ storiesOf("Components|Tiles", module)
9999 Edit on Carbon UI Builder
100100 </a>
101101 <br><br>
102- <ibm-clickable-tile href="https://www.carbondesignsystem.com/" target="_blank" [theme]="theme">
102+ <ibm-clickable-tile href="https://www.carbondesignsystem.com/" target="_blank" [theme]="theme" [disabled]="disabled" >
103103 Click the tile to open the Carbon Design System
104104 </ibm-clickable-tile>
105105 ` ,
106106 props : {
107- theme : select ( "theme" , [ "dark" , "light" ] , "dark" )
107+ theme : select ( "theme" , [ "dark" , "light" ] , "dark" ) ,
108+ disabled : boolean ( "disabled" , false )
108109 }
109110 } ) )
110111 . add ( "Routable" , ( ) => ( {
111112 template : `
112- <ibm-clickable-tile [route]="['foo']" [theme]="theme">
113+ <ibm-clickable-tile [route]="['foo']" [theme]="theme" [disabled]="disabled" >
113114 Click to trigger the <code>foo</code> route
114115 </ibm-clickable-tile>
115- <ibm-clickable-tile [route]="['bar']" [theme]="theme">
116+ <ibm-clickable-tile [route]="['bar']" [theme]="theme" [disabled]="disabled" >
116117 Click to trigger the <code>bar</code> route
117118 </ibm-clickable-tile>
118119 <router-outlet></router-outlet>
119120 ` ,
120121 props : {
121- theme : select ( "theme" , [ "dark" , "light" ] , "dark" )
122+ theme : select ( "theme" , [ "dark" , "light" ] , "dark" ) ,
123+ disabled : boolean ( "disabled" , false )
122124 }
123125 } ) )
124126 . add ( "Selectable" , ( ) => ( {
@@ -135,14 +137,15 @@ storiesOf("Components|Tiles", module)
135137 </a>
136138 <br><br>
137139 <ibm-tile-group (selected)="selected($event)" [multiple]="false">
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>
140+ <ibm-selection-tile value="tile1" [disabled]="disabled" [ selected]="true" [theme]="theme">Selectable Tile</ibm-selection-tile>
141+ <ibm-selection-tile value="tile2" [disabled]="disabled" [ theme]="theme">Selectable Tile</ibm-selection-tile>
142+ <ibm-selection-tile value="tile3" [disabled]="disabled" [ theme]="theme">Selectable Tile</ibm-selection-tile>
141143 </ibm-tile-group>
142144 ` ,
143145 props : {
144146 selected : action ( "tile selected" ) ,
145- theme : select ( "theme" , [ "dark" , "light" ] , "dark" )
147+ theme : select ( "theme" , [ "dark" , "light" ] , "dark" ) ,
148+ disabled : boolean ( "disabled" , false )
146149 }
147150 } ) )
148151 . add ( "Multi-select" , ( ) => ( {
@@ -172,14 +175,15 @@ storiesOf("Components|Tiles", module)
172175 </a>
173176 <br><br>
174177 <ibm-tile-group (selected)="selected($event)" [multiple]="true">
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>
178+ <ibm-selection-tile value="tile1" [selected]="true" [theme]="theme" [disabled]="disabled" >Selectable Tile</ibm-selection-tile>
179+ <ibm-selection-tile value="tile2" [theme]="theme" [disabled]="disabled" >Selectable Tile</ibm-selection-tile>
180+ <ibm-selection-tile value="tile3" [theme]="theme" [disabled]="disabled" >Selectable Tile</ibm-selection-tile>
178181 </ibm-tile-group>
179182 ` ,
180183 props : {
181184 selected : action ( "tile selected" ) ,
182- theme : select ( "theme" , [ "dark" , "light" ] , "dark" )
185+ theme : select ( "theme" , [ "dark" , "light" ] , "dark" ) ,
186+ disabled : boolean ( "disabled" , false )
183187 }
184188 } ) )
185189 . add ( "Expandable" , ( ) => ( {
0 commit comments