- {isDarkMode ? (
- <>
-
-
-
- >
- ) : (
- <>
-
-
-
- >
- )}
+
+
+
+
+
+
diff --git a/src/components/common/sidebar/Sidebar.style.js b/src/components/common/sidebar/Sidebar.style.js
index 2719c3e..0acfa12 100644
--- a/src/components/common/sidebar/Sidebar.style.js
+++ b/src/components/common/sidebar/Sidebar.style.js
@@ -76,35 +76,36 @@ export const StyledKeywordIcon = styled(VscSymbolKeyword)`
`;
const DarkModeIconStyles = css`
- font-size: 1.6rem !important;
+ font-size: 1.4rem !important;
margin-right: 10px;
cursor: pointer;
`;
const ToggleIconStyles = css`
- font-size: 2.3rem !important;
+ font-size: 1.5rem !important;
margin-right: 10px;
cursor: pointer;
`;
-export const StyledHeaderMoonIcon = styled(IoMoonOutline)`
+/* export const StyledHeaderMoonIcon = styled(IoMoonOutline)`
${DarkModeIconStyles}
- color: ${({ darkMode }) => (darkMode ? "gold" : "gold")};
+ color: ${({ darkMode }) => (darkMode ? "black" : "rgba(0,0,0,0.3)")};
`;
export const StyledHeaderSunIcon = styled(IoSunnyOutline)`
${DarkModeIconStyles}
- color: ${({ darkMode }) => (darkMode ? "rgba(0, 0, 0, 0.7)" : "#F87315")};
-`;
+ color: ${({ darkMode }) =>
+ darkMode ? "rgba(0, 0, 0, 0.7)" : "rgba(0,0,0,0.3)"};
+`; */
export const StyledHeaderFillMoonIcon = styled(IoMoon)`
${DarkModeIconStyles}
- color: ${({ filled }) => (filled ? "gold" : "#000")};
+ color: ${({ darkMode }) => (darkMode ? "gold" : "rgba(0,0,0,0.3)")};
`;
export const StyledHeaderFillSunIcon = styled(IoSunny)`
${DarkModeIconStyles}
- color: ${({ filled }) => (filled ? "#F87315" : "#000")};
+ color: ${({ darkMode }) => (darkMode ? "rgba(0,0,0,0.3)" : "#F87315")};
`;
export const StyledToggleIcon = styled(MdToggleOff)`
@@ -117,3 +118,27 @@ export const StyledToggleDarkIcon = styled(BiSolidToggleRight)`
color: rgba(0, 0, 0, 0.7);
transition: color 0.3s;
`;
+
+export const StyledToggleContainer = styled.div`
+ width: 50px;
+ height: 25px;
+ border-radius: 15px;
+ background-color: ${({ isDarkMode }) => (isDarkMode ? "#333" : "#ddd")};
+ display: flex;
+ align-items: center;
+ padding: 0 5px;
+ cursor: pointer;
+ position: relative;
+ transition: background-color 0.3s;
+ margin: 0px 5px;
+`;
+
+export const StyledToggleCircle = styled.div`
+ width: 15px;
+ height: 15px;
+ border-radius: 50%;
+ background-color: white;
+ position: absolute;
+ left: ${({ isDarkMode }) => (isDarkMode ? "calc(100% - 25px)" : "5px")};
+ transition: left 0.3s;
+`;
From 0d806806336198827d86d669b9cfa3aba9ce1f2b Mon Sep 17 00:00:00 2001
From: JaeIn1 <97165077+JaeIn1@users.noreply.github.com>
Date: Thu, 13 Jun 2024 09:01:58 +0900
Subject: [PATCH 11/11] =?UTF-8?q?=E2=9C=A8=20feat:=20Search=20Input=20?=
=?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EB=B6=84=EB=A6=AC=20?=
=?UTF-8?q?=EC=99=84=EB=A3=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/common/header/Header.jsx | 20 ++--------
src/components/common/header/Header.style.js | 38 +------------------
src/components/common/search/Search.jsx | 19 ++++++++++
src/components/common/search/Search.style.js | 37 ++++++++++++++++++
src/components/common/sidebar/Sidebar.jsx | 4 +-
.../common/sidebar/Sidebar.style.js | 4 +-
6 files changed, 65 insertions(+), 57 deletions(-)
create mode 100644 src/components/common/search/Search.jsx
create mode 100644 src/components/common/search/Search.style.js
diff --git a/src/components/common/header/Header.jsx b/src/components/common/header/Header.jsx
index 16a74d2..732d536 100644
--- a/src/components/common/header/Header.jsx
+++ b/src/components/common/header/Header.jsx
@@ -1,24 +1,12 @@
-import React, { useState } from "react";
-import {
- StyledHeaderDiv,
- StyledHeaderInput,
- StyledHeaderParentDiv,
- StyledHeaderInputDiv,
- StyledSearchIcon,
-} from "./Header.style";
+import React from "react";
+import { StyledHeaderDiv, StyledHeaderParentDiv } from "./Header.style";
+import Search from "../search/Search";
export default function Header(props) {
return (
-
-
-
-
+
);
diff --git a/src/components/common/header/Header.style.js b/src/components/common/header/Header.style.js
index ddcb969..ef01a81 100644
--- a/src/components/common/header/Header.style.js
+++ b/src/components/common/header/Header.style.js
@@ -1,5 +1,4 @@
-import styled, { css } from "styled-components";
-import { IoSearch } from "react-icons/io5";
+import styled from "styled-components";
export const StyledHeaderDiv = styled.div`
display: flex;
@@ -21,38 +20,3 @@ export const StyledHeaderParentDiv = styled.div`
margin-left: 100px;
width: 90%;
`;
-
-export const StyledHeaderInputDiv = styled.div`
- position: relative;
-`;
-
-export const StyledHeaderInput = styled.input`
- width: ${(props) => props.width || "900px"};
- height: ${(props) => props.height || "50px"};
- padding: 10px;
- line-height: 2rem;
- border: 1px solid rgba(0, 0, 0, 0.3);
- border-radius: 30px;
- font-size: 20px;
- margin-left: 100px;
-
- &:focus {
- outline: none;
- box-shadow: 0 0 5px rgba(40, 203, 238, 1);
- border: 1px solid rgba(81, 203, 238, 1);
- }
-
- &::placeholder {
- font-size: 18px;
- padding-left: 10px;
- }
-`;
-
-export const StyledSearchIcon = styled(IoSearch)`
- position: absolute;
- right: 20px;
- top: 50%;
- transform: translateY(-50%);
- font-size: 24px;
- color: rgba(0, 0, 0, 0.5);
-`;
diff --git a/src/components/common/search/Search.jsx b/src/components/common/search/Search.jsx
new file mode 100644
index 0000000..f1cb78e
--- /dev/null
+++ b/src/components/common/search/Search.jsx
@@ -0,0 +1,19 @@
+import React from "react";
+import {
+ StyledHeaderInput,
+ StyledHeaderInputDiv,
+ StyledSearchIcon,
+} from "./Search.style";
+
+export default function Search(props) {
+ return (
+
+
+
+
+ );
+}
diff --git a/src/components/common/search/Search.style.js b/src/components/common/search/Search.style.js
new file mode 100644
index 0000000..3c11d0e
--- /dev/null
+++ b/src/components/common/search/Search.style.js
@@ -0,0 +1,37 @@
+import styled from "styled-components";
+import { IoSearch } from "react-icons/io5";
+
+export const StyledHeaderInputDiv = styled.div`
+ position: relative;
+`;
+
+export const StyledHeaderInput = styled.input`
+ width: ${(props) => props.width || "900px"};
+ height: ${(props) => props.height || "50px"};
+ padding: 10px;
+ line-height: 2rem;
+ border: 1px solid rgba(0, 0, 0, 0.3);
+ border-radius: 30px;
+ font-size: 20px;
+ margin-left: 100px;
+
+ &:focus {
+ outline: none;
+ box-shadow: 0 0 5px rgba(40, 203, 238, 1);
+ border: 1px solid rgba(81, 203, 238, 1);
+ }
+
+ &::placeholder {
+ font-size: 18px;
+ padding-left: 10px;
+ }
+`;
+
+export const StyledSearchIcon = styled(IoSearch)`
+ position: absolute;
+ right: 20px;
+ top: 50%;
+ transform: translateY(-50%);
+ font-size: 24px;
+ color: rgba(0, 0, 0, 0.5);
+`;
diff --git a/src/components/common/sidebar/Sidebar.jsx b/src/components/common/sidebar/Sidebar.jsx
index ab2dc6a..3844344 100644
--- a/src/components/common/sidebar/Sidebar.jsx
+++ b/src/components/common/sidebar/Sidebar.jsx
@@ -52,11 +52,11 @@ export default function Sidebar() {
marginBottom: "10px",
}}
>
-
+
-
+
diff --git a/src/components/common/sidebar/Sidebar.style.js b/src/components/common/sidebar/Sidebar.style.js
index 0acfa12..0a5c919 100644
--- a/src/components/common/sidebar/Sidebar.style.js
+++ b/src/components/common/sidebar/Sidebar.style.js
@@ -134,8 +134,8 @@ export const StyledToggleContainer = styled.div`
`;
export const StyledToggleCircle = styled.div`
- width: 15px;
- height: 15px;
+ width: 20px;
+ height: 20px;
border-radius: 50%;
background-color: white;
position: absolute;