File tree Expand file tree Collapse file tree 2 files changed +69
-1
lines changed Expand file tree Collapse file tree 2 files changed +69
-1
lines changed Original file line number Diff line number Diff line change 194
194
background-color : $color-brand-dark ;
195
195
}
196
196
}
197
+
198
+ .slds-indicator_unread {
199
+ display : inline-block ;
200
+ height : 6px ;
201
+ width : 6px ;
202
+ position : relative ;
203
+ top : auto ;
204
+ left : auto ;
205
+ }
206
+ }
207
+
208
+ /* *
209
+ * @summary Creates styles for a Tab Item when its in an unsaved or dirty state
210
+ * @selector .slds-is-unsaved
211
+ * @restrict .slds-tabs_default__item
212
+ */
213
+ & .slds-is-unsaved {
214
+
215
+ .slds-indicator_unread {
216
+ margin-left : -0.35rem ; // random but matches spec
217
+ }
218
+
219
+ .slds-indicator_unsaved {
220
+ position : relative ;
221
+ top : ($spacing-xx-small * -1 );
222
+ }
223
+
197
224
}
198
225
}
199
226
Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ let Subtab = props => (
18
18
{
19
19
'slds-has-notification' : props . hasNotification ,
20
20
'slds-has-focus' : props . hasFocus ,
21
- 'slds-active' : props . active
21
+ 'slds-active' : props . active ,
22
+ 'slds-is-unsaved' : props . itemUnsaved
22
23
} ,
23
24
props . className
24
25
) }
@@ -352,5 +353,45 @@ export let states = [
352
353
</ div >
353
354
</ div >
354
355
)
356
+ } ,
357
+ {
358
+ id : 'subtabs-notification-dirty' ,
359
+ label : 'Unsaved With Notification' ,
360
+ element : (
361
+ < div className = "slds-tabs_default slds-sub-tabs" >
362
+ < ul className = "slds-tabs_default__nav" role = "tablist" >
363
+ < Subtab
364
+ title = "00071938"
365
+ active
366
+ tabItemId = "subtab-tabitem-01"
367
+ tabPanelId = "subtab-tabpanel-01"
368
+ />
369
+ < Subtab
370
+ title = "Chat - Customer"
371
+ hasNotification
372
+ itemUnsaved
373
+ tabItemId = "subtab-tabitem-02"
374
+ tabPanelId = "subtab-tabpanel-02"
375
+ symbol = "live_chat"
376
+ />
377
+ </ ul >
378
+ < div
379
+ className = "slds-tabs_default__content slds-show"
380
+ id = "subtab-tabpanel-01"
381
+ role = "tabpanel"
382
+ aria-labelledby = "subtab-tabitem-01"
383
+ >
384
+ Item One Content
385
+ </ div >
386
+ < div
387
+ className = "slds-tabs_default__content slds-hide"
388
+ id = "subtab-tabpanel-02"
389
+ role = "tabpanel"
390
+ aria-labelledby = "subtab-tabitem-02"
391
+ >
392
+ Item Two Content
393
+ </ div >
394
+ </ div >
395
+ )
355
396
}
356
397
] ;
You can’t perform that action at this time.
0 commit comments