Skip to content

Commit

Permalink
[MWPW-156739] Adding preview buttons icon and CTA bar spacing tweak (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
qiyundai authored Aug 15, 2024
1 parent a2deb69 commit dd3d497
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 11 deletions.
29 changes: 24 additions & 5 deletions ecc/blocks/form-handler/form-handler.css
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@

.form-handler .form-handler-ctas-panel a {
font-size: var(--type-body-s-size);
display: inline-flex;
align-items: center;
gap: 4px;
}

.form-handler .side-menu ul li a {
Expand Down Expand Up @@ -350,7 +353,6 @@
.form-handler .form-handler-ctas-panel .form-handler-panel-wrapper > div {
display: flex;
align-items: center;
gap: 14px;
}

.form-handler .form-handler-ctas-panel .form-handler-backward-wrapper .back-btn {
Expand All @@ -367,8 +369,21 @@
}

.form-handler .form-handler-ctas-panel .form-handler-forward-wrapper > div:first-of-type {
padding-right: 16px;
border-right: 2px solid var(--color-black);
padding-right: 64px;
border-right: 1px solid var(--color-black);
margin-right: 104px;
}

.form-handler .form-handler-ctas-panel .form-handler-forward-wrapper .action-area:first-child {
display: flex;
align-items: center;
gap: 24px;
}

.form-handler .form-handler-ctas-panel .form-handler-forward-wrapper .action-area:last-child {
display: flex;
align-items: center;
gap: 16px;
}

.form-handler .form-handler-ctas-panel a.disabled,
Expand All @@ -385,7 +400,7 @@

.form-handler .form-handler-ctas-panel a.next-button:hover {
filter: invert();
}
}

.form-handler .form-handler-ctas-panel a.fill {
background-color: var(--color-gray-200);
Expand All @@ -396,14 +411,18 @@
min-height: 21px;
padding: 7px 18px 8px;
border: 2px solid var(--color-white);
display: inline-block;
}

.form-handler .form-handler-ctas-panel a.fill:hover {
text-decoration: none;
filter: invert();
}

.form-handler .form-handler-ctas-panel a.preview-btns svg {
height: 20px;
width: 28px;
}

.form-handler .form-handler-ctas-panel .form-handler-panel-wrapper .con-button.outline {
color: var(--color-white);
border-color: var(--color-white);
Expand Down
4 changes: 4 additions & 0 deletions ecc/blocks/form-handler/form-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ function initFormCtas(props) {
const forwardWrapper = createTag('div', { class: 'form-handler-forward-wrapper' }, '', { parent: panelWrapper });

forwardActionsWrappers.forEach((w) => {
w.classList.add('action-area');
forwardWrapper.append(w);
});

Expand Down Expand Up @@ -512,7 +513,9 @@ function initFormCtas(props) {
if (ctaUrl.hash === '#next') {
cta.classList.add('next-button');
const [nextStateText, finalStateText, doneStateText, republishStateText] = cta.textContent.split('||');

cta.textContent = nextStateText;
cta.append(getIcon('chev-right-white'));
cta.dataset.nextStateText = nextStateText;
cta.dataset.finalStateText = finalStateText;
cta.dataset.doneStateText = doneStateText;
Expand All @@ -527,6 +530,7 @@ function initFormCtas(props) {
cta.prepend(getIcon('golden-rocket'));
} else {
cta.textContent = nextStateText;
cta.append(getIcon('chev-right-white'));
}
}

Expand Down
11 changes: 11 additions & 0 deletions ecc/icons/chev-right-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ecc/icons/chev-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 22 additions & 5 deletions ecc/icons/ecc-icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ecc/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function convertEccIcon(n) {
const eccIcons = [
'ecc-content',
'ecc-star-wire',
'ecc-webpage',
];

const iconRegex = /@@(.*?)@@/g;
Expand Down

0 comments on commit dd3d497

Please sign in to comment.