Skip to content

Commit

Permalink
Use the admin theme color for the chevron icon in TopBar component …
Browse files Browse the repository at this point in the history
…and simplify its layout and style.
  • Loading branch information
eason9487 committed Aug 17, 2023
1 parent d6166c0 commit 2df2bd8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
6 changes: 3 additions & 3 deletions js/src/components/stepper/top-bar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ const TopBar = ( { title, backHref, helpButton, onBackButtonClick } ) => {
return (
<div className="gla-stepper-top-bar">
<Link
className="back-button"
className="components-button gla-stepper-top-bar__back-button"
href={ backHref }
type="wc-admin"
onClick={ onBackButtonClick }
>
<GridiconChevronLeft />
</Link>
<span className="title">{ title }</span>
<div className="actions">{ helpButton }</div>
<span className="gla-stepper-top-bar__title">{ title }</span>
{ helpButton }
</div>
);
};
Expand Down
22 changes: 8 additions & 14 deletions js/src/components/stepper/top-bar/index.scss
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
.gla-stepper-top-bar {
display: flex;
align-items: stretch;
align-items: center;
min-height: $grid-unit-40 * 2;
background-color: $white;
box-shadow: 0 -1px 0 0 $gray-400 inset;

.back-button {
display: flex;
align-items: center;
.components-button {
height: auto;
align-self: stretch;
}

&__back-button {
padding: 0 calc(var(--main-gap) / 2);
}

.title {
align-self: center;
&__title {
flex: 1;
font-size: $editor-font-size;
font-weight: 400;
line-height: $gla-line-height-medium-large;
letter-spacing: 0;
}

.actions {
.components-button {
height: 100%;
}
}
}

0 comments on commit 2df2bd8

Please sign in to comment.