Skip to content

Commit 5ba4f15

Browse files
authored
fix: add horizontal padding to header for better mobile responsiveness (#281)
* Fixes #274: [Added horizontal padding to header for better mobile layout] * fixes #281: [Apply horizontal padding only on small screens in conditional Box rendering.] fix: change the header padding to medium in mobile view
1 parent 7a1128a commit 5ba4f15

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/components/atomic/SimpleHeader.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const MobileNavItemExternalLink = ({ target, label }) => (
9898

9999
const PrimaryNav = ({ primaryNav }) => {
100100
return (
101-
<Box direction={"row"} align={"center"} gap={"large"}>
101+
<Box direction={"row"} align={"center"} gap={"large"} >
102102
<DropDownMenu title={"Tools"} options={dropDownOptionsTools} />
103103
<Link to={"/blog"}>
104104
<Button plain={true}>
@@ -133,9 +133,9 @@ const SimpleHeader = ({ label, target, primaryNav, onHamburgerClicked }) => {
133133
}
134134

135135
return (
136-
<Box direction={"row"} wrap={true} height={"76.8px"} width={"960px"}>
136+
<Box direction={"row"} wrap={"true"} height={"76.8px"} width={"960px"} >
137137
{size !== "small" ? (
138-
<Box direction={"row"} align={"center"} width={"960px"} gap={"xsmall"}>
138+
<Box direction={"row"} align={"center"} width={"960px"} gap={"xsmall"} >
139139
<TattleLogo data={{ fill: Theme.text_color_light }} />
140140
{label.length !== 0 ? (
141141
<Text weight={900} level={3} margin="none">
@@ -150,8 +150,9 @@ const SimpleHeader = ({ label, target, primaryNav, onHamburgerClicked }) => {
150150
width={"100%"}
151151
direction={"row"}
152152
align={"center"}
153-
fill={true}
153+
fill={"true"}
154154
gap={"xsmall"}
155+
pad={{ horizontal: "medium" }}
155156
>
156157
<TattleLogo data={{ fill: Theme.text_color_light }} />
157158
{label.length !== 0 ? (
@@ -168,8 +169,8 @@ const SimpleHeader = ({ label, target, primaryNav, onHamburgerClicked }) => {
168169
</Box>
169170
)}
170171
{open && (
171-
<Layer position="right" onClickOutside={onClose} animation={"slide"}>
172-
<Box fill={true} flex={"grow"} overflow="auto" background={"brand"}>
172+
<Layer position="right" onClickOutside={onClose} animation={"slide"} >
173+
<Box fill={true} flex={"grow"} overflow="auto" background={"brand"} >
173174
<Box
174175
fill={true}
175176
pad={size !== "small" ? "small" : "medium"}

0 commit comments

Comments
 (0)