File tree Expand file tree Collapse file tree 14 files changed +220
-120
lines changed
SearchBoxWithAutosuggestions/src
SearchBoxWithInstantSearch/src
SearchBoxWithKeyboardShortcuts/src
SearchBoxWithPillSuggestions/src
SearchBoxWithVoiceSearch/src Expand file tree Collapse file tree 14 files changed +220
-120
lines changed Original file line number Diff line number Diff line change 66 "license" : " Apache-2.0" ,
77 "dependencies" : {
88 "@appbaseio/reactivesearch" : " 4.0.0-rc.1" ,
9- "react" : " ^17.0 .0" ,
10- "react-dom" : " ^17.0 .0" ,
11- "react-scripts" : " 3 .0.1"
9+ "react" : " ^18.2 .0" ,
10+ "react-dom" : " ^18.2 .0" ,
11+ "react-scripts" : " 5 .0.1"
1212 },
1313 "scripts" : {
1414 "start" : " react-scripts start" ,
Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ body {
1515.col {
1616 flex : 1 ;
1717 padding : 15px ;
18+ max-width : 100% ;
1819}
1920
2021.row > .col : first-child {
2122 border-right : 1px solid # ccc ;
22- max-width : 400px ;
2323}
2424
2525.row > .col : last-child {
@@ -70,11 +70,6 @@ body {
7070.authors-list {
7171 color : # 9d9d9d ;
7272 font-weight : bold;
73- overflow : hidden;
74- text-overflow : ellipsis;
75- display : -webkit-box;
76- -webkit-line-clamp : 2 ;
77- -webkit-box-orient : vertical;
7873}
7974
8075.ratings-list {
@@ -151,3 +146,12 @@ body {
151146.col .meetup-list-image {
152147 background-size : cover;
153148}
149+ .authors-list {
150+ color : # 9d9d9d ;
151+ font-weight : bold;
152+ overflow : hidden;
153+ text-overflow : ellipsis;
154+ display : -webkit-box;
155+ -webkit-line-clamp : 2 ;
156+ -webkit-box-orient : vertical;
157+ }
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ const Main = () => (
1515 >
1616 < div className = "row" >
1717 < div className = "col" >
18+ { ' ' }
1819 < SearchBox
1920 title = "SearchBox"
2021 dataField = { [ 'original_title' , 'original_title.search' ] }
@@ -37,15 +38,13 @@ const Main = () => (
3738 enableRecentSuggestions
3839 recentSuggestionsConfig = { {
3940 size : 5 ,
40- minHits : 5 ,
41+ minHits : 2 ,
4142 minChars : 3 ,
4243 index : 'movies-demo-app' , // further restrict the index to search on
4344 sectionLabel : '<b>Recent suggestions 🙌🏻</b>' ,
4445 } }
4546 />
46- </ div >
47-
48- < div className = "col" >
47+ < br />
4948 < ReactiveList
5049 componentId = "SearchResult"
5150 dataField = "original_title"
Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ body {
1515.col {
1616 flex : 1 ;
1717 padding : 15px ;
18+ max-width : 100% ;
1819}
1920
2021.row > .col : first-child {
2122 border-right : 1px solid # ccc ;
22- max-width : 400px ;
2323}
2424
2525.row > .col : last-child {
@@ -70,11 +70,6 @@ body {
7070.authors-list {
7171 color : # 9d9d9d ;
7272 font-weight : bold;
73- overflow : hidden;
74- text-overflow : ellipsis;
75- display : -webkit-box;
76- -webkit-line-clamp : 2 ;
77- -webkit-box-orient : vertical;
7873}
7974
8075.ratings-list {
@@ -151,3 +146,12 @@ body {
151146.col .meetup-list-image {
152147 background-size : cover;
153148}
149+ .authors-list {
150+ color : # 9d9d9d ;
151+ font-weight : bold;
152+ overflow : hidden;
153+ text-overflow : ellipsis;
154+ display : -webkit-box;
155+ -webkit-line-clamp : 2 ;
156+ -webkit-box-orient : vertical;
157+ }
Original file line number Diff line number Diff line change @@ -12,14 +12,13 @@ const Main = () => (
1212 < div className = "row" >
1313 < div className = "col" >
1414 < SearchBox
15- title = "SearchBox"
15+ title = "SearchBox with InstantSearch "
1616 dataField = { [ 'original_title' , 'original_title.search' ] }
1717 componentId = "MoviesSensor"
1818 autosuggest = { false }
19+ showFocusShortcutsIcon = { false }
1920 />
20- </ div >
21-
22- < div className = "col" >
21+ < br />
2322 < ReactiveList
2423 componentId = "SearchResult"
2524 dataField = "original_title"
Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ body {
1515.col {
1616 flex : 1 ;
1717 padding : 15px ;
18+ max-width : 100% ;
1819}
1920
2021.row > .col : first-child {
2122 border-right : 1px solid # ccc ;
22- max-width : 400px ;
2323}
2424
2525.row > .col : last-child {
@@ -70,11 +70,6 @@ body {
7070.authors-list {
7171 color : # 9d9d9d ;
7272 font-weight : bold;
73- overflow : hidden;
74- text-overflow : ellipsis;
75- display : -webkit-box;
76- -webkit-line-clamp : 2 ;
77- -webkit-box-orient : vertical;
7873}
7974
8075.ratings-list {
@@ -151,3 +146,12 @@ body {
151146.col .meetup-list-image {
152147 background-size : cover;
153148}
149+ .authors-list {
150+ color : # 9d9d9d ;
151+ font-weight : bold;
152+ overflow : hidden;
153+ text-overflow : ellipsis;
154+ display : -webkit-box;
155+ -webkit-line-clamp : 2 ;
156+ -webkit-box-orient : vertical;
157+ }
Original file line number Diff line number Diff line change @@ -12,14 +12,12 @@ const Main = () => (
1212 < div className = "row" >
1313 < div className = "col" >
1414 < SearchBox
15- title = "SearchBox"
15+ title = "SearchBox with keyboard shortcuts "
1616 dataField = { [ 'original_title' , 'original_title.search' ] }
1717 componentId = "MoviesSensor"
18- focusShortcuts = { [ 'SHIFT+Y ' ] }
18+ focusShortcuts = { [ '⌘ + K ' ] }
1919 />
20- </ div >
21-
22- < div className = "col" >
20+ < br />
2321 < ReactiveList
2422 componentId = "SearchResult"
2523 dataField = "original_title"
Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ body {
1515.col {
1616 flex : 1 ;
1717 padding : 15px ;
18+ max-width : 100% ;
1819}
1920
2021.row > .col : first-child {
2122 border-right : 1px solid # ccc ;
22- max-width : 400px ;
2323}
2424
2525.row > .col : last-child {
@@ -152,6 +152,7 @@ body {
152152 display : flex;
153153 gap : 10px ;
154154 overflow : auto;
155+ margin-top : 10px ;
155156}
156157.pill-wrapper ::-webkit-scrollbar {
157158 height : 0px ;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const Main = () => {
2020 < div className = "row" >
2121 < div className = "col" >
2222 < SearchBox
23- title = "SearchBox"
23+ title = "SearchBox with pill suggestions "
2424 defaultValue = { 'Free Guy' }
2525 dataField = { [ 'original_title' , 'original_title.search' ] }
2626 componentId = "MoviesSensor"
@@ -34,7 +34,7 @@ const Main = () => {
3434 error,
3535 data,
3636 value,
37- downshiftProps : { isOpen , getItemProps } ,
37+ downshiftProps : { getItemProps } ,
3838 } ) => {
3939 if ( loading ) {
4040 return < div > Fetching Suggestions.</ div > ;
@@ -46,7 +46,7 @@ const Main = () => {
4646 </ div >
4747 ) ;
4848 }
49- return isOpen && Boolean ( value . length ) ? (
49+ return Boolean ( value . length ) ? (
5050 < div className = "pill-wrapper" >
5151 { data . map ( ( suggestion , index ) => (
5252 < button
@@ -63,9 +63,7 @@ const Main = () => {
6363 ) : null ;
6464 } }
6565 />
66- </ div >
67-
68- < div className = "col" >
66+ < br />
6967 < ReactiveList
7068 componentId = "SearchResult"
7169 dataField = "original_title"
Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ body {
1515.col {
1616 flex : 1 ;
1717 padding : 15px ;
18+ max-width : 100% ;
1819}
1920
2021.row > .col : first-child {
2122 border-right : 1px solid # ccc ;
22- max-width : 400px ;
2323}
2424
2525.row > .col : last-child {
@@ -70,11 +70,6 @@ body {
7070.authors-list {
7171 color : # 9d9d9d ;
7272 font-weight : bold;
73- overflow : hidden;
74- text-overflow : ellipsis;
75- display : -webkit-box;
76- -webkit-line-clamp : 2 ;
77- -webkit-box-orient : vertical;
7873}
7974
8075.ratings-list {
@@ -151,3 +146,12 @@ body {
151146.col .meetup-list-image {
152147 background-size : cover;
153148}
149+ .authors-list {
150+ color : # 9d9d9d ;
151+ font-weight : bold;
152+ overflow : hidden;
153+ text-overflow : ellipsis;
154+ display : -webkit-box;
155+ -webkit-line-clamp : 2 ;
156+ -webkit-box-orient : vertical;
157+ }
You can’t perform that action at this time.
0 commit comments