Skip to content

Commit a0fc8ce

Browse files
style tweaks
1 parent 5359f2e commit a0fc8ce

File tree

2 files changed

+40
-13
lines changed

2 files changed

+40
-13
lines changed

src/welcome/admin.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -478,12 +478,17 @@ const Sidenav = ( {
478478
} ) }
479479
<div className="s-save-changes-wrapper">
480480
{ currentTab !== 'v2-settings' &&
481-
<button
482-
className={ saveButtonClasses }
483-
onClick={ handleSettingsSave }
484-
>
485-
{ isSaving ? <Spinner /> : __( 'Save Changes', i18n ) }
486-
</button>
481+
<>
482+
<div className="s-save-changes-inner-wrapper">
483+
{ hasUnsavedChanges && <span className="s-save-changes-note">{ __( 'There are unsaved changes', i18n ) }</span> }
484+
<button
485+
className={ saveButtonClasses }
486+
onClick={ handleSettingsSave }
487+
>
488+
{ isSaving ? <Spinner /> : __( 'Save Changes', i18n ) }
489+
</button>
490+
</div>
491+
</>
487492
}
488493
</div>
489494
</div>

src/welcome/admin.scss

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ body[class*="page_stk-"] {
166166
}
167167
.s-settings-subtitle {
168168
width: 75%;
169-
margin-bottom: 40px;
169+
margin: 0.5em 0 40px;
170170
}
171171
.s-settings-field,
172172
.ugb-admin-setting {
@@ -501,7 +501,7 @@ body.toplevel_page_stk-custom-fields {
501501
width: 250px;
502502
left: 0;
503503
background-color: #fff;
504-
padding-top: 80px;
504+
padding-top: 20px;
505505
display: flex;
506506
flex-direction: column;
507507
justify-content: flex-start;
@@ -564,6 +564,11 @@ body.toplevel_page_stk-custom-fields {
564564
flex-direction: column;
565565
justify-content: end;
566566
}
567+
.s-save-changes-inner-wrapper {
568+
bottom: 20px;
569+
display: inline-block;
570+
position: sticky;
571+
}
567572
// This is a button, render this in the bottom of the side bar
568573
// The side bar is a flex container, so this will be at the bottom.
569574
.s-save-changes {
@@ -580,22 +585,29 @@ body.toplevel_page_stk-custom-fields {
580585
font-size: 14px;
581586
cursor: pointer;
582587
box-sizing: border-box !important;
583-
display: inline-block;
584-
position: sticky;
585-
bottom: 20px;
588+
min-height: 55px;
586589
&:hover {
587590
opacity: 0.85;
588591
box-shadow: none !important;
589592
}
590593
&:not(.s-button-has-unsaved-changes) {
591-
opacity: 0.5;
592-
filter: grayscale(50%);
594+
filter: saturate(0);
593595
}
594596
}
597+
.s-save-changes-note {
598+
top: -30px;
599+
position: absolute;
600+
display: block;
601+
right: 0;
602+
left: 0;
603+
text-align: center;
604+
}
595605
}
596606
.s-search-setting {
597607
display: flex;
598608
justify-content: end;
609+
position: absolute;
610+
right: 30px;
599611
.s-search-setting__input {
600612
margin: 0;
601613
padding: 0.5em 1em;
@@ -671,6 +683,16 @@ body.toplevel_page_stk-custom-fields {
671683
&:not(:last-child) {
672684
border-bottom: 1px solid #eaecf0;
673685
}
686+
&:first-child {
687+
padding-top: 0;
688+
h2 {
689+
margin-top: 0;
690+
}
691+
}
692+
h2 {
693+
font-size: 1.6em;
694+
margin: 1em 0 0.5em;
695+
}
674696
}
675697

676698
.s-v2-settings {

0 commit comments

Comments
 (0)