Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export default function SettingsPanel({
</IconLine>
) :
null;
// if the Switch component is disabled then the text to describe it will be a disabled color.
const autoLog = showAutoLog ? (
<IconLine
icon={
Expand All @@ -168,7 +169,9 @@ export default function SettingsPanel({
/>
}
>
{i18n.getString('autoLogCalls', currentLocale)}
<span className={classnames(disableAutoLogEnabled && styles.disableText)}>
{i18n.getString('autoLogCalls', currentLocale)}
</span>
</IconLine>
) :
null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,7 @@
padding: 0 10px;
margin-bottom: -2px;
}

.disableText{
color: $smoke;
}
8 changes: 7 additions & 1 deletion packages/ringcentral-widgets/components/Switch/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ $slider-size: #{$switch-height - 2 * $switch-padding};
width: $switch-width;
height: $switch-height;
vertical-align: middle;
background-color: white;
border-radius: $switch-height;
}

/* Hide default HTML checkbox */
Expand Down Expand Up @@ -46,8 +48,12 @@ $slider-size: #{$switch-height - 2 * $switch-padding};
}

.disable {
.slider {
opacity: 0.4;
background-color: $smoke;
}
input:checked + .slider {
background-color: #ccc;
background-color: $rc-blue;
}
input:focus + .slider {
box-shadow: 0 0 1px #ccc;
Expand Down