Commit 319db725 authored by Kim, Subin's avatar Kim, Subin
Browse files

Search 불러오는 곳 구분 & css

parent 36b97dd4
...@@ -6,7 +6,7 @@ const MainNav = () => { ...@@ -6,7 +6,7 @@ const MainNav = () => {
<a class="nav-link text-white" href="#">영화</a> <a class="nav-link text-white" href="#">영화</a>
<a class="nav-link text-white" href="#">빠른예매</a> <a class="nav-link text-white" href="#">빠른예매</a>
<a class="nav-link text-white" href="#">극장</a> <a class="nav-link text-white" href="#">극장</a>
<Search /> <Search type="home" />
</nav> </nav>
) )
} }
......
import styles from "./search.module.scss"; import styles from "./search.module.scss";
const Search = () => { const Search = ({ type }) => {
console.log("type==",type)
return ( return (
<div className="d-flex"> <div className="d-flex">
<input className="form-control" type="text" id="search" /> <input className="form-control" type="text" id={type === "home" ? styles.searchWhite : styles.search} />
<i className="bi bi-search align-self-center text-white" style={{ fontSize: "1.3rem" }}></i> <i className={`bi bi-search align-self-center ${type === "home" ? "text-white" : "mx-1"} ${styles.icon}`} style={{ fontSize: "1.3rem" }}></i>
</div> </div>
) )
} }
......
input[type="text"] { .icon {
cursor: pointer;
}
#searchWhite {
background: transparent; background: transparent;
border: none; border: none;
border-bottom: 2px solid #fff; border-bottom: 2px solid #fff;
...@@ -7,16 +11,22 @@ input[type="text"] { ...@@ -7,16 +11,22 @@ input[type="text"] {
border-radius: 0; border-radius: 0;
color: #fff; color: #fff;
margin-bottom: 5px; margin-bottom: 5px;
}
input[type="text"]:focus { &:focus {
background: transparent; background: transparent;
-webkit-box-shadow: none; -webkit-box-shadow: none;
box-shadow: none; box-shadow: none;
border-color: #fff; border-color: #fff;
color: #fff; color: #fff;
}
} }
i { #search {
cursor: pointer; box-shadow: none;
-webkit-box-shadow: none;
&:focus {
-webkit-box-shadow: none;
box-shadow: none;
border-color: #000;
}
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment