-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from softeerbootcamp4th/feature/performance-u…
…pper [feat, chore] 자잘한 것들 수정 및 성능 개선
- Loading branch information
Showing
23 changed files
with
282 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { useState } from "react"; | ||
import style from "./style.module.css"; | ||
|
||
function HamburgerButton({ children }) { | ||
const [opened, setOpened] = useState(false); | ||
return ( | ||
<> | ||
<button | ||
className="flex md:hidden justify-center items-center size-6 z-10" | ||
aria-label="open-menu" | ||
onClick={() => setOpened((state) => !state)} | ||
> | ||
<div className={style.hamburger} data-opened={opened}> | ||
<div></div> | ||
</div> | ||
</button> | ||
<div className="fixed -z-10 w-full top-0 left-0 bg-white flex md:hidden flex-col justify-center items-center gap-2"> | ||
<div className="w-full mt-16 shadow-xl">{opened && children}</div> | ||
</div> | ||
</> | ||
); | ||
} | ||
|
||
export default HamburgerButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
.hamburger { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
position: relative; | ||
width: 24px; | ||
height: 20px; | ||
} | ||
|
||
.hamburger > div, | ||
.hamburger > div::before, | ||
.hamburger > div::after { | ||
width: 100%; | ||
height: 2px; | ||
box-sizing: border-box; | ||
background-color: currentColor; | ||
transition: all 0.3s; | ||
} | ||
|
||
.hamburger > div { | ||
position: absolute; | ||
border-color: #24adaf; | ||
} | ||
|
||
.hamburger > div::before { | ||
content: ""; | ||
display: block; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
transform: translateY(-10px); | ||
} | ||
|
||
.hamburger > div::after { | ||
content: ""; | ||
display: block; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
transform: translateY(10px); | ||
} | ||
|
||
.hamburger[data-opened="true"] > div { | ||
transform: rotate(135deg); | ||
} | ||
|
||
.hamburger[data-opened="true"] > div::before { | ||
transform: translateY(0px) rotate(180deg); | ||
} | ||
|
||
.hamburger[data-opened="true"] > div::after { | ||
transform: translateY(-0px) rotate(-270deg); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.