File tree Expand file tree Collapse file tree 5 files changed +30
-8
lines changed
packages/docsearch-css/src Expand file tree Collapse file tree 5 files changed +30
-8
lines changed Original file line number Diff line number Diff line change 8080}
8181
8282/* search component wrapper */
83- .search-wrapper {
83+ .search-wrapper ,
84+ .default-wrapper {
8485 display : flex;
8586 justify-content : center;
8687 align-items : center;
@@ -114,7 +115,7 @@ main {
114115}
115116
116117/* docsearch button customization */
117- .DocSearch-Button {
118+ .search-wrapper . DocSearch-Button {
118119 margin : 0 !important ;
119120 background : # f7fafc !important ;
120121 border : 2px solid # e2e8f0 !important ;
@@ -125,13 +126,13 @@ main {
125126 box-shadow : 0 2px 4px rgba (0 , 0 , 0 , 0.05 ) !important ;
126127}
127128
128- .DocSearch-Button : hover {
129+ .search-wrapper . DocSearch-Button : hover {
129130 border-color : # 667eea !important ;
130131 box-shadow : 0 4px 12px rgba (102 , 126 , 234 , 0.15 ) !important ;
131132 transform : translateY (-1px ) !important ;
132133}
133134
134- .DocSearch-Button-Placeholder {
135+ .search-wrapper . DocSearch-Button-Placeholder {
135136 color : # 718096 !important ;
136137}
137138
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import '@docsearch/css/dist/style.css';
88import Basic from './examples/basic' ;
99import BasicAskAI from './examples/basic-askai' ;
1010import Composable from './examples/composable' ;
11+ import Default from './examples/default' ;
1112import DynamicImportModal from './examples/dynamic-import-modal' ;
1213import MultiIndex from './examples/multi-index' ;
1314import WHitComponent from './examples/w-hit-component' ;
@@ -24,6 +25,13 @@ function App(): JSX.Element {
2425 </ header >
2526
2627 < main >
28+ < section className = "demo-section" >
29+ < p className = "section-description" > default</ p >
30+ < div className = "default-wrapper" >
31+ < Default />
32+ </ div >
33+ </ section >
34+
2735 < section className = "demo-section" >
2836 < p className = "section-description" > basic search functionality</ p >
2937 < div className = "search-wrapper" >
Original file line number Diff line number Diff line change 1+ /* eslint-disable react/react-in-jsx-scope */
2+ import { DocSearch } from '@docsearch/react' ;
3+ import type { JSX } from 'react' ;
4+
5+ export default function DefaultExperience ( ) : JSX . Element {
6+ return < DocSearch indexName = "docsearch" appId = "PMZUYBQDAK" apiKey = "24b09689d5b4223813d9b8e48563c8f6" /> ;
7+ }
Original file line number Diff line number Diff line change 2020 --docsearch-logo-color : rgba (0 , 61 , 255 , 1 );
2121 --docsearch-border-radius : 4px ;
2222
23+ /* button */
24+ --docsearch-search-button-background : # fff ;
25+ --docsearch-search-button-text-color : var (--docsearch-secondary-text-color );
26+
2327 /* modal */
2428 --docsearch-modal-width : 800px ;
2529 --docsearch-modal-height : 600px ;
@@ -111,4 +115,6 @@ html[data-theme='dark'] {
111115 );
112116 --docsearch-dropdown-menu-background : var (--docsearch-hit-background );
113117 --docsearch-dropdown-menu-item-hover-background : var (--docsearch-modal-background );
118+ --docsearch-search-button-background : var (--docsearch-modal-background );
119+ --docsearch-search-button-text-color : var (--docsearch-text-color );
114120}
Original file line number Diff line number Diff line change 22 align-items : center;
33 border : 1px solid var (--docsearch-subtle-color );
44 border-radius : 4px ;
5- background-color : var (--docsearch-searchbox -background );
6- color : var (--docsearch-muted -color );
5+ background-color : var (--docsearch-search-button -background );
6+ color : var (--docsearch-search-button-text -color );
77 cursor : pointer;
88 display : flex;
99 all : unset;
2020}
2121
2222.DocSearch-Button-Container svg {
23- color : var ( --docsearch-muted-color ) ;
23+ color : currentColor ;
2424}
2525
2626.DocSearch-Search-Icon {
3737 font-size : 1rem ;
3838 padding-block : 0 ;
3939 padding-inline : 8px 12px ;
40- color : var ( --docsearch-muted-color ) ;
40+ color : currentColor ;
4141 display : inline-block;
4242 line-height : normal;
4343}
You can’t perform that action at this time.
0 commit comments