Showing
3 changed files
with
9 additions
and
7 deletions
... | @@ -132,7 +132,7 @@ const Header = () => { | ... | @@ -132,7 +132,7 @@ const Header = () => { |
132 | /> | 132 | /> |
133 | </DropDownWrap> | 133 | </DropDownWrap> |
134 | </DropDownContainer> | 134 | </DropDownContainer> |
135 | - <InputBlock color="blue" size="14px" width="400px"> | 135 | + <InputBlock color="blue" size="14px" width="400px" display=""> |
136 | <input /> | 136 | <input /> |
137 | </InputBlock> | 137 | </InputBlock> |
138 | </SearchContainer> | 138 | </SearchContainer> | ... | ... |
... | @@ -30,7 +30,7 @@ const Input = ({ | ... | @@ -30,7 +30,7 @@ const Input = ({ |
30 | float, | 30 | float, |
31 | width, | 31 | width, |
32 | placeholder = '내용을 입력해 주세요.', | 32 | placeholder = '내용을 입력해 주세요.', |
33 | - value, | 33 | + display, |
34 | }) => { | 34 | }) => { |
35 | const [query, setQuery] = useState(''); | 35 | const [query, setQuery] = useState(''); |
36 | const history = useHistory(); | 36 | const history = useHistory(); |
... | @@ -41,7 +41,7 @@ const Input = ({ | ... | @@ -41,7 +41,7 @@ const Input = ({ |
41 | float={float} | 41 | float={float} |
42 | width={width} | 42 | width={width} |
43 | placeholder={placeholder} | 43 | placeholder={placeholder} |
44 | - value={value} | 44 | + display={display} |
45 | > | 45 | > |
46 | <input | 46 | <input |
47 | placeholder={placeholder} | 47 | placeholder={placeholder} |
... | @@ -65,7 +65,7 @@ const Input = ({ | ... | @@ -65,7 +65,7 @@ const Input = ({ |
65 | history.push(`?${params.toString()}`); | 65 | history.push(`?${params.toString()}`); |
66 | }} | 66 | }} |
67 | > | 67 | > |
68 | - <SearchBox color="blue" size="50px" /> | 68 | + <SearchBox color="blue" size="50px" display={display} /> |
69 | </SearchIconWrap> | 69 | </SearchIconWrap> |
70 | </InputBlock> | 70 | </InputBlock> |
71 | ); | 71 | ); | ... | ... |
... | @@ -6,7 +6,7 @@ const ButtonBlock = styled.button` | ... | @@ -6,7 +6,7 @@ const ButtonBlock = styled.button` |
6 | width: ${props => props.size}; | 6 | width: ${props => props.size}; |
7 | height: ${props => props.size}; | 7 | height: ${props => props.size}; |
8 | background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -3 30 30'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E"); | 8 | background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -3 30 30'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E"); |
9 | - | 9 | + display: ${props => props.display}; |
10 | background-color: ${props => searchBoxColorMap[props.color].background}; | 10 | background-color: ${props => searchBoxColorMap[props.color].background}; |
11 | &:hover { | 11 | &:hover { |
12 | background-color: ${props => | 12 | background-color: ${props => |
... | @@ -18,8 +18,10 @@ const ButtonBlock = styled.button` | ... | @@ -18,8 +18,10 @@ const ButtonBlock = styled.button` |
18 | cursor: pointer; | 18 | cursor: pointer; |
19 | `; | 19 | `; |
20 | 20 | ||
21 | -const SearchBox = ({ color, float, size }) => { | 21 | +const SearchBox = ({ color, float, size = '1px', display = 'none' }) => { |
22 | - return <ButtonBlock color={color} float={float} size={size} />; | 22 | + return ( |
23 | + <ButtonBlock color={color} float={float} size={size} display={display} /> | ||
24 | + ); | ||
23 | }; | 25 | }; |
24 | 26 | ||
25 | export default SearchBox; | 27 | export default SearchBox; | ... | ... |
-
Please register or login to post a comment