Skip to content

Commit

Permalink
feat: SearchBar 디자인 추가 #106
Browse files Browse the repository at this point in the history
  • Loading branch information
seoye0ng committed Jan 21, 2024
1 parent 50536a3 commit 6c81b32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/components/shared/search-bar/SearchBar.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
gap: 11.5px;
background-color: var(--tertiary-200);

&.white {
background-color: var(--white);
}

input {
flex-grow: 1;
height: 100%;
Expand Down
4 changes: 2 additions & 2 deletions src/components/shared/search-bar/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import styles from './SearchBar.module.scss';

const cx = classNames.bind(styles);

function SearchBar() {
function SearchBar({ isWhite = false }:{ isWhite?:boolean }) {
const [keyword, setKeyword] = useState<string>('');

const handleSearch = () => {
Expand All @@ -22,7 +22,7 @@ function SearchBar() {

return (
<form
className={cx('container')}
className={cx('container', { white: isWhite })}
onSubmit={(e) => {
e.preventDefault();
handleSearch();
Expand Down

0 comments on commit 6c81b32

Please sign in to comment.