Skip to content

Commit

Permalink
Feat:header 레이아웃 완성
Browse files Browse the repository at this point in the history
  • Loading branch information
wokbjso committed Dec 8, 2023
1 parent 8b7f81f commit c85ff97
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 32 deletions.
42 changes: 21 additions & 21 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"react-scripts": "5.0.1",
"styled-components": "^6.1.1",
"styled-reset": "^4.5.1",
"typescript": "^4.9.5",
"typescript": "5.1.6",
"web-vitals": "^2.1.4"
},
"scripts": {
Expand Down
Binary file added public/img/headerText.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 38 additions & 1 deletion src/common/layout/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,46 @@
import { styled } from "styled-components";
import HeaderButton from "../ui/buttons/HeaderButton/HeaderButton";
import theme from "@/styles/theme";

export default function Header() {
return <HeaderLayout>Header</HeaderLayout>;
return (
<HeaderLayout>
<HeaderText />
<HeaderBtn>
<HeaderButton
width="9.6rem"
bgColor={theme.colors.white}
addClass={`border:1px solid ${theme.colors.mainColor}; margin-right:2rem;`}
>
로그인
</HeaderButton>
<HeaderButton
width="11.4rem"
bgColor={theme.colors.mainColor}
addClass={`border:1px solid ${theme.colors.white}; color:${theme.colors.white}`}
>
회원가입
</HeaderButton>
</HeaderBtn>
</HeaderLayout>
);
}

const HeaderLayout = styled.header`
display: flex;
justify-content: space-between;
font-size: 2rem;
padding: 4rem;
`;

const HeaderText = styled.div`
width: 17.2rem;
height: 7.3rem;
background-image: url("/img/headerText.jpg");
background-size: cover;
`;

const HeaderBtn = styled.div`
display: flex;
align-items: center;
`;
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions src/common/ui/buttons/HeaderButton/HeaderButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import theme from "@/styles/theme";
import Button, { ButtonProps } from "../Button/Buttons";

export default function HeaderButton({
width,
bgColor,
children,
addClass,
}: Omit<ButtonProps, "height">) {
return (
<Button
width={width}
height="4rem"
bgColor={bgColor}
addClass={
`border-radius:2rem; ${theme.fontStyles.body0}; font-weight:400;` +
addClass
}
>
{children}
</Button>
);
}
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15200,7 +15200,7 @@ __metadata:
storybook: ^7.5.3
styled-components: ^6.1.1
styled-reset: ^4.5.1
typescript: ^4.9.5
typescript: 5.1.6
vite: ^5.0.4
vite-plugin-svgr: ^4.2.0
web-vitals: ^2.1.4
Expand Down Expand Up @@ -17328,23 +17328,23 @@ __metadata:
languageName: node
linkType: hard

"typescript@npm:^4.9.5":
version: 4.9.5
resolution: "typescript@npm:4.9.5"
"typescript@npm:5.1.6":
version: 5.1.6
resolution: "typescript@npm:5.1.6"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: ee000bc26848147ad423b581bd250075662a354d84f0e06eb76d3b892328d8d4440b7487b5a83e851b12b255f55d71835b008a66cbf8f255a11e4400159237db
checksum: b2f2c35096035fe1f5facd1e38922ccb8558996331405eb00a5111cc948b2e733163cc22fab5db46992aba7dd520fff637f2c1df4996ff0e134e77d3249a7350
languageName: node
linkType: hard

"typescript@patch:typescript@^4.9.5#~builtin<compat/typescript>":
version: 4.9.5
resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin<compat/typescript>::version=4.9.5&hash=289587"
"typescript@patch:typescript@5.1.6#~builtin<compat/typescript>":
version: 5.1.6
resolution: "typescript@patch:typescript@npm%3A5.1.6#~builtin<compat/typescript>::version=5.1.6&hash=5da071"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 1f8f3b6aaea19f0f67cba79057674ba580438a7db55057eb89cc06950483c5d632115c14077f6663ea76fd09fce3c190e6414bb98582ec80aa5a4eaf345d5b68
checksum: f53bfe97f7c8b2b6d23cf572750d4e7d1e0c5fff1c36d859d0ec84556a827b8785077bc27676bf7e71fae538e517c3ecc0f37e7f593be913d884805d931bc8be
languageName: node
linkType: hard

Expand Down

0 comments on commit c85ff97

Please sign in to comment.