Showing
1 changed file
with
40 additions
and
25 deletions
... | @@ -2,10 +2,11 @@ import React, { useState } from 'react'; | ... | @@ -2,10 +2,11 @@ import React, { useState } from 'react'; |
2 | import { NavLink, useHistory } from 'react-router-dom'; | 2 | import { NavLink, useHistory } from 'react-router-dom'; |
3 | import styled from 'styled-components'; | 3 | import styled from 'styled-components'; |
4 | import InputBlock from './common/Input'; | 4 | import InputBlock from './common/Input'; |
5 | -import SearchBox from './common/SearchBox'; | ||
6 | import DropDownButton from './common/DropdownButton'; | 5 | import DropDownButton from './common/DropdownButton'; |
7 | import Button from './common/Button'; | 6 | import Button from './common/Button'; |
8 | import Modal from './SearchOptionModal'; | 7 | import Modal from './SearchOptionModal'; |
8 | +import palette from '../lib/styles/palette'; | ||
9 | + | ||
9 | // 헤더 사이즈 | 10 | // 헤더 사이즈 |
10 | const HeaderHeight = '170px'; | 11 | const HeaderHeight = '170px'; |
11 | 12 | ||
... | @@ -20,12 +21,12 @@ const MainContainer = styled.div` | ... | @@ -20,12 +21,12 @@ const MainContainer = styled.div` |
20 | top: 0; | 21 | top: 0; |
21 | width: 100%; | 22 | width: 100%; |
22 | z-index: 999; | 23 | z-index: 999; |
23 | - background-color: #ffffff; | 24 | + background-color: white; |
24 | - border-bottom: 1px solid #868e96; | 25 | + border-bottom: 1px solid ${palette.gray4}; |
25 | `; | 26 | `; |
26 | const MenuContainer = styled.div` | 27 | const MenuContainer = styled.div` |
27 | - position: fixed; | 28 | + position: absolute; |
28 | - top: 100px; | 29 | + top: 96px; |
29 | left: 0px; | 30 | left: 0px; |
30 | `; | 31 | `; |
31 | 32 | ||
... | @@ -55,11 +56,12 @@ const SLink = styled(NavLink)` | ... | @@ -55,11 +56,12 @@ const SLink = styled(NavLink)` |
55 | padding-right: 2em; | 56 | padding-right: 2em; |
56 | text-decoration: none !important; | 57 | text-decoration: none !important; |
57 | &:hover { | 58 | &:hover { |
58 | - background-color: #feebb6; | 59 | + background-color: ${palette.gray4}; |
60 | + border-bottom: 3px solid ${palette.gray4}; | ||
59 | } | 61 | } |
60 | &.active { | 62 | &.active { |
61 | font-weight: 600; | 63 | font-weight: 600; |
62 | - background-color: #feebb6; | 64 | + border-bottom: 3px solid ${palette.gray6}; |
63 | float: left; | 65 | float: left; |
64 | line-height: 55px; | 66 | line-height: 55px; |
65 | vertical-align: middle; | 67 | vertical-align: middle; |
... | @@ -70,7 +72,7 @@ const SLink = styled(NavLink)` | ... | @@ -70,7 +72,7 @@ const SLink = styled(NavLink)` |
70 | text-decoration: none !important; | 72 | text-decoration: none !important; |
71 | } | 73 | } |
72 | `; | 74 | `; |
73 | - | 75 | +const DropDownWrap = styled.div``; |
74 | const SearchOptionContainer = styled.div` | 76 | const SearchOptionContainer = styled.div` |
75 | float: left; | 77 | float: left; |
76 | `; | 78 | `; |
... | @@ -80,8 +82,8 @@ const SortOptionContainer = styled.div` | ... | @@ -80,8 +82,8 @@ const SortOptionContainer = styled.div` |
80 | `; | 82 | `; |
81 | 83 | ||
82 | const OptionContainer = styled.div` | 84 | const OptionContainer = styled.div` |
83 | - position: fixed; | 85 | + position: absolute; |
84 | - top: 130px; | 86 | + top: 129px; |
85 | left: 650px; | 87 | left: 650px; |
86 | `; | 88 | `; |
87 | 89 | ||
... | @@ -96,44 +98,51 @@ const AirContainer = styled.div` | ... | @@ -96,44 +98,51 @@ const AirContainer = styled.div` |
96 | height: ${HeaderHeight}; | 98 | height: ${HeaderHeight}; |
97 | `; | 99 | `; |
98 | 100 | ||
101 | +const DropDownContainer = styled.div` | ||
102 | + flex-direction: column; | ||
103 | +`; | ||
104 | + | ||
99 | const Header = () => { | 105 | const Header = () => { |
100 | const [showModal, setShowModal] = useState(false); | 106 | const [showModal, setShowModal] = useState(false); |
101 | const openModal = () => { | 107 | const openModal = () => { |
102 | setShowModal(prev => !prev); | 108 | setShowModal(prev => !prev); |
103 | }; | 109 | }; |
104 | - const [setQuery] = useState(''); | ||
105 | const history = useHistory(); | 110 | const history = useHistory(); |
106 | const onMainClick = () => { | 111 | const onMainClick = () => { |
107 | - setQuery(''); | ||
108 | history.push(''); | 112 | history.push(''); |
109 | }; | 113 | }; |
110 | - | ||
111 | return ( | 114 | return ( |
112 | <> | 115 | <> |
113 | <MainContainer> | 116 | <MainContainer> |
114 | <HeaderTop /> | 117 | <HeaderTop /> |
115 | <LogoContainer onClick={onMainClick}>로고</LogoContainer> | 118 | <LogoContainer onClick={onMainClick}>로고</LogoContainer> |
116 | <SearchContainer> | 119 | <SearchContainer> |
120 | + <DropDownContainer> | ||
121 | + <DropDownWrap> | ||
117 | <DropDownButton | 122 | <DropDownButton |
118 | color="blue" | 123 | color="blue" |
119 | float="left" | 124 | float="left" |
120 | fontsize="20px" | 125 | fontsize="20px" |
121 | - height="34px" | 126 | + height="50px" |
122 | - > | 127 | + options={[ |
123 | - 전체 | 128 | + { id: 1, name: '전체' }, |
124 | - </DropDownButton> | 129 | + { id: 2, name: '개인' }, |
125 | - <InputBlock color="blue" size="14px" float="left" width="400px"> | 130 | + { id: 3, name: '부서' }, |
131 | + ]} | ||
132 | + /> | ||
133 | + </DropDownWrap> | ||
134 | + </DropDownContainer> | ||
135 | + <InputBlock color="blue" size="14px" width="400px"> | ||
126 | <input /> | 136 | <input /> |
127 | </InputBlock> | 137 | </InputBlock> |
128 | - <SearchBox color="blue" size="50px" /> | ||
129 | </SearchContainer> | 138 | </SearchContainer> |
130 | <MenuContainer> | 139 | <MenuContainer> |
131 | <ul> | 140 | <ul> |
132 | - <SLink activeClassName="active" to="categori0"> | 141 | + <SLink activeClassName="active" to="/search"> |
133 | 전체 | 142 | 전체 |
134 | </SLink> | 143 | </SLink> |
135 | - <SLink to="/categori1">개인</SLink> | 144 | + <SLink to="/search_categori1">개인</SLink> |
136 | - <SLink to="/categori2">부서</SLink> | 145 | + <SLink to="/search_categori2">부서</SLink> |
137 | </ul> | 146 | </ul> |
138 | </MenuContainer> | 147 | </MenuContainer> |
139 | <OptionContainer> | 148 | <OptionContainer> |
... | @@ -144,9 +153,15 @@ const Header = () => { | ... | @@ -144,9 +153,15 @@ const Header = () => { |
144 | <SortOptionContainer> | 153 | <SortOptionContainer> |
145 | <DropDownButton | 154 | <DropDownButton |
146 | color="white" | 155 | color="white" |
147 | - width="80px" | 156 | + width="85px" |
148 | - fontsize="15px" | 157 | + fontsize="16px" |
149 | - height="28px" | 158 | + height="38px" |
159 | + options={[ | ||
160 | + { value: 0, name: '정렬' }, | ||
161 | + { value: 1, name: '날짜빠른순' }, | ||
162 | + { value: 2, name: '크기높은순' }, | ||
163 | + { value: 3, name: '크기낮은순' }, | ||
164 | + ]} | ||
150 | > | 165 | > |
151 | 정렬 | 166 | 정렬 |
152 | </DropDownButton> | 167 | </DropDownButton> | ... | ... |
-
Please register or login to post a comment