Skip to content

Commit cc0733e

Browse files
GallectionsThatNerdSquared
authored andcommitted
refactor: adding new ElementCenter type as styled li container
1 parent a404b88 commit cc0733e

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/components/constants.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@ export const Col = styled.div`
5757
`;
5858

5959
//
60-
export const Center = styled.li`
60+
export const ElementCenter = styled.li`
61+
display: flex;
62+
justify-content: center;
63+
`;
64+
65+
export const Center = styled.div`
6166
display: flex;
6267
justify-content: center;
6368
`;

src/components/header.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import { Center, links } from "./constants";
2+
import { ElementCenter, links } from "./constants";
33
import styled from "styled-components";
44
import Logo_Transparent from "../images/logo/iGEMLogo_Transparent.svg";
55
import { useEffect, useRef, useState } from "react";
@@ -42,12 +42,12 @@ export default function Header() {
4242
</Link>
4343
</NavBar.li>
4444
))}
45-
<Center>
45+
<ElementCenter>
4646
<CancelImageStyle
4747
src={CancelImage}
4848
onClick={() => toggleDrawer(false)}
4949
/>
50-
</Center>
50+
</ElementCenter>
5151
</NavBar.Links>
5252
</NavBar.Wrapper>
5353
);

0 commit comments

Comments
 (0)