diff --git a/ui/components/tabs/base/_index.scss b/ui/components/tabs/base/_index.scss index 7f2b5fffc8..6019f79b1c 100644 --- a/ui/components/tabs/base/_index.scss +++ b/ui/components/tabs/base/_index.scss @@ -194,6 +194,33 @@ background-color: $color-brand-dark; } } + + .slds-indicator_unread { + display: inline-block; + height: 6px; + width: 6px; + position: relative; + top: auto; + left: auto; + } + } + + /** + * @summary Creates styles for a Tab Item when its in an unsaved or dirty state + * @selector .slds-is-unsaved + * @restrict .slds-tabs_default__item + */ + &.slds-is-unsaved { + + .slds-indicator_unread { + margin-left: -0.35rem; //random but matches spec + } + + .slds-indicator_unsaved { + position: relative; + top: ($spacing-xx-small * -1); + } + } } diff --git a/ui/components/tabs/sub-tabs/example.jsx b/ui/components/tabs/sub-tabs/example.jsx index 96e34c2d08..e58612a15b 100644 --- a/ui/components/tabs/sub-tabs/example.jsx +++ b/ui/components/tabs/sub-tabs/example.jsx @@ -18,7 +18,8 @@ let Subtab = props => ( { 'slds-has-notification': props.hasNotification, 'slds-has-focus': props.hasFocus, - 'slds-active': props.active + 'slds-active': props.active, + 'slds-is-unsaved': props.itemUnsaved }, props.className )} @@ -352,5 +353,45 @@ export let states = [ ) + }, + { + id: 'subtabs-notification-dirty', + label: 'Unsaved With Notification', + element: ( +