Skip to content

Commit de21936

Browse files
authored
fix(navbar): update navbar design (#297)
* fix(navbar): navbar logo fix * fix(navbar): fix inner wrapper and children overflows and adjust spacing #287 * fix(navbar): fix navbar spacing issues and right icon color
1 parent 23a7d1a commit de21936

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

doc/src/components/common/componentData/Navbar/index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,6 @@ export const componentData = {
145145
146146
render() {
147147
148-
const MenuIcon = () => (
149-
<svg xmlns="http://www.w3.org/2000/svg" height="30px" id="Layer_1" version="1.1" viewBox="0 0 30 30" width="30px"><path d="M4,10h24c1.104,0,2-0.896,2-2s-0.896-2-2-2H4C2.896,6,2,6.896,2,8S2.896,10,4,10z M28,14H4c-1.104,0-2,0.896-2,2 s0.896,2,2,2h24c1.104,0,2-0.896,2-2S29.104,14,28,14z M28,22H4c-1.104,0-2,0.896-2,2s0.896,2,2,2h24c1.104,0,2-0.896,2-2 S29.104,22,28,22z"/></svg>
150-
);
151-
152148
return (
153149
<div>
154150
<PreviewBlock header="Default Navbar">
@@ -160,7 +156,7 @@ export const componentData = {
160156
<PreviewBlock header="Navbar with leftIcon">
161157
162158
{/* Navbar with icon on left set with leftIcon prop */}
163-
<Navbar leftIcon={<MenuIcon />} title="logo" />
159+
<Navbar leftIcon={match} title="logo" />
164160
165161
</PreviewBlock>
166162
<PreviewBlock header="Flat Navbar (No box shadow)">

lib/navbar/theme.module.scss

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
:local(.navbarWrapper) {
44
z-index: 2;
5+
display: flex;
56
box-sizing: border-box;
67
width: 100%;
7-
height: 81px;
8-
height: fit-content;
9-
height: -moz-fit-content;
8+
height: 5rem;
109
font-family: 'Roboto';
1110
box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.5);
1211
.clearfix {
@@ -15,8 +14,10 @@
1514
}
1615
:local(.innerWrapper) {
1716
display: flex;
17+
padding: 0% 2%;
1818
z-index: 2;
1919
justify-content: space-between;
20+
align-items: center;
2021
height: 100%;
2122
width: 100%;
2223
position: relative;
@@ -31,6 +32,8 @@
3132
box-sizing: border-box;
3233
padding: 2%;
3334
display: flex;
35+
width: fit-content;
36+
width: -moz-fit-content;
3437
align-items: center;
3538
}
3639
:local(.title) {
@@ -39,7 +42,6 @@
3942
height: 33px;
4043
font-size: 24px;
4144
font-weight: bold;
42-
text-transform: uppercase;
4345
color: $white;
4446
margin-right: 15px;
4547
white-space: nowrap;
@@ -58,17 +60,12 @@
5860
cursor: pointer;
5961
svg, img {
6062
width: auto;
61-
height: 100%;
63+
height: 70%;
6264
color: $white;
6365
fill: $white;
6466
}
6567
}
66-
:local(.leftIcon) {
67-
margin-right: 15px;
68-
}
69-
:local(.rightIcon) {
70-
margin-left: 15px;
71-
}
68+
7269
:local(.fixedPosition) {
7370
position: fixed;
7471
top: 0;
@@ -122,8 +119,7 @@
122119
@media only screen and (max-width: 768px) {
123120
.icon-menu {
124121
display: block;
125-
background: white;
126-
color: $cool-blue;
122+
color: white;
127123
}
128124

129125
:local(.navlinks) {

0 commit comments

Comments
 (0)