@@ -113,21 +113,6 @@ class NotificationCalc extends React.Component {
113
113
) ;
114
114
} ;
115
115
116
- durationFormater = val => {
117
- switch ( val ) {
118
- case 255 :
119
- return "Forever" ;
120
- case 1 :
121
- return "1 second" ;
122
- default :
123
- if ( val > 59 ) {
124
- return `${ Math . floor ( val / 60 ) } ${ val % 60 } seconds` ;
125
- } else {
126
- return `${ val } seconds` ;
127
- }
128
- }
129
- } ;
130
-
131
116
setValue = key => ( e , v ) => {
132
117
this . props . onChange (
133
118
key ,
@@ -184,7 +169,12 @@ class NotificationCalc extends React.Component {
184
169
</ Tooltip >
185
170
</ div >
186
171
< Typography gutterBottom > Color</ Typography >
187
- < div className = { this . props . classes . colorHelper } />
172
+ < div
173
+ className = { this . props . classes . colorHelper }
174
+ style = { {
175
+ filter : this . props . effect === "0" ? "grayscale(75%)" : undefined
176
+ } }
177
+ />
188
178
< Slider
189
179
defaultValue = { 1 }
190
180
aria-labelledby = "discrete-slider"
@@ -194,6 +184,7 @@ class NotificationCalc extends React.Component {
194
184
max = { 255 }
195
185
value = { this . props . color }
196
186
onChange = { this . setValue ( "color" ) }
187
+ disabled = { this . props . effect === "0" }
197
188
/>
198
189
199
190
< Typography gutterBottom > Brightness Level</ Typography >
@@ -208,6 +199,7 @@ class NotificationCalc extends React.Component {
208
199
min = { 0 }
209
200
max = { 10 }
210
201
onChange = { this . setValue ( "level" ) }
202
+ disabled = { this . props . effect === "0" }
211
203
/>
212
204
</ Grid >
213
205
< Grid item >
@@ -229,6 +221,7 @@ class NotificationCalc extends React.Component {
229
221
max = { 255 }
230
222
onChange = { this . setValue ( "duration" ) }
231
223
ValueLabelComponent = { ValueLabelTooltip }
224
+ disabled = { this . props . effect === "0" }
232
225
/>
233
226
</ Grid >
234
227
< Grid item >
@@ -238,7 +231,7 @@ class NotificationCalc extends React.Component {
238
231
< FormControl fullWidth = { true } margin = "normal" >
239
232
< InputLabel > Effect</ InputLabel >
240
233
< Select value = { this . props . effect } onChange = { this . setValue ( "effect" ) } >
241
- { /* <MenuItem value="0">Off</MenuItem> */ }
234
+ < MenuItem value = "0" > Off (Notification Cleared) </ MenuItem >
242
235
< MenuItem
243
236
value = {
244
237
this . props . type === "dimmer"
0 commit comments