File tree Expand file tree Collapse file tree 3 files changed +25
-9
lines changed Expand file tree Collapse file tree 3 files changed +25
-9
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ class SearchHeader extends React.Component {
43
43
` }
44
44
render = { data => (
45
45
< header
46
- className = { `md:mb-4 searchHeader ${
47
- searchIsFixed ? "searchHeader --fixed" : ""
46
+ className = { `md:mb-4 search-header ${
47
+ searchIsFixed ? "search-header --fixed" : ""
48
48
} `}
49
49
>
50
50
< Search searchIndex = { data . siteSearchIndex . index } />
Original file line number Diff line number Diff line change @@ -23,30 +23,30 @@ export default class Search extends Component {
23
23
onChange = { this . search }
24
24
placeholder = "Search"
25
25
/>
26
- < ul className = "p-0 bg-white " >
26
+ < ul className = "p-0 search-results-list " >
27
27
{ this . state . results . map ( ( n , i ) => {
28
28
const { query } = this . state ;
29
29
return (
30
30
< div key = { i } >
31
31
{ n . getSummary &&
32
32
n . getSummary . toLowerCase ( ) . includes ( query . toLowerCase ( ) ) && (
33
- < li className = "list-reset" >
33
+ < li className = "list-reset p-1 md:p-0 " >
34
34
< Link to = { `/api/v4/${ _ . kebabCase ( n . name ) } ` } >
35
35
{ n . getSummary }
36
36
</ Link >
37
37
</ li >
38
38
) }
39
39
{ n . postSummary &&
40
40
n . postSummary . toLowerCase ( ) . includes ( query . toLowerCase ( ) ) && (
41
- < li className = "list-reset" >
41
+ < li className = "list-reset p-1 md:p-0 " >
42
42
< Link to = { `/api/v4/${ _ . kebabCase ( n . name ) } /#post` } >
43
43
{ n . postSummary }
44
44
</ Link >
45
45
</ li >
46
46
) }
47
47
{ n . putSummary &&
48
48
n . putSummary . toLowerCase ( ) . includes ( query . toLowerCase ( ) ) && (
49
- < li className = "list-reset" >
49
+ < li className = "list-reset p-1 md:p-0 " >
50
50
< Link to = { `/api/v4/${ _ . kebabCase ( n . name ) } /#put` } >
51
51
{ n . putSummary }
52
52
</ Link >
@@ -56,7 +56,7 @@ export default class Search extends Component {
56
56
n . deleteSummary
57
57
. toLowerCase ( )
58
58
. includes ( query . toLowerCase ( ) ) && (
59
- < li className = "list-reset" >
59
+ < li className = "list-reset p-1 md:p-0 " >
60
60
< Link to = { `/api/v4/${ _ . kebabCase ( n . name ) } /#delete` } >
61
61
{ n . deleteSummary }
62
62
</ Link >
Original file line number Diff line number Diff line change 105
105
@apply border-grey-light;
106
106
}
107
107
108
- .searchHeader {
108
+ .search-header {
109
109
position : relative;
110
110
top : 0 ;
111
111
width : auto;
112
112
transition : all 0.15s cubic-bezier (0 , 0 , 0.2 , 1 );
113
113
}
114
114
115
- .searchHeader . searchHeader --fixed {
115
+ .search-header . search-header --fixed {
116
116
position : fixed;
117
117
top : 65px ;
118
118
left : 0 ;
119
119
width : 100% ;
120
120
z-index : 1 ;
121
121
}
122
122
123
+ .search-results-list {
124
+ background-color : # fff ;
125
+ }
126
+
127
+ .search-header--fixed .search-results-list {
128
+ max-height : 250px ;
129
+ height : 100% ;
130
+ overflow-y : scroll;
131
+ box-shadow : 0px 5px 8px -2px rgba (0 , 0 , 0 , 0.5 );
132
+ }
133
+
123
134
@screen md {
124
135
.api-content-wrapper {
125
136
margin-left : 300px ;
148
159
width : 300px ;
149
160
padding : 2rem ;
150
161
}
162
+
163
+ .search-results-list {
164
+ box-shadow : none;
165
+ background-color : none;
166
+ }
151
167
}
You can’t perform that action at this time.
0 commit comments