File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
packages/instantsearch.js/src Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ class SearchBox extends Component<
207
207
rootProps = { {
208
208
className : cssClasses . submit ,
209
209
type : 'submit' ,
210
- title : 'Submit the search query' ,
210
+ title : templates . submitTitle ,
211
211
hidden : ! showSubmit ,
212
212
} }
213
213
templates = { templates }
@@ -220,7 +220,7 @@ class SearchBox extends Component<
220
220
rootProps = { {
221
221
className : cssClasses . reset ,
222
222
type : 'reset' ,
223
- title : 'Clear the search query' ,
223
+ title : templates . resetTitle ,
224
224
hidden : ! (
225
225
showReset &&
226
226
this . state . query . trim ( ) &&
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ const defaultTemplate: SearchBoxComponentTemplates = {
17
17
</ svg >
18
18
) ;
19
19
} ,
20
+ resetTitle : 'Clear the search query' ,
20
21
submit ( { cssClasses } ) {
21
22
return (
22
23
< svg
@@ -30,6 +31,7 @@ const defaultTemplate: SearchBoxComponentTemplates = {
30
31
</ svg >
31
32
) ;
32
33
} ,
34
+ submitTitle : 'Submit the search query' ,
33
35
loadingIndicator ( { cssClasses } ) {
34
36
/* eslint-disable react/no-unknown-property */
35
37
// Preact supports kebab case attributes, and using camel case would
Original file line number Diff line number Diff line change @@ -32,10 +32,18 @@ export type SearchBoxTemplates = Partial<{
32
32
* Template used for displaying the submit button. Can accept a function or a Hogan string.
33
33
*/
34
34
submit : Template < { cssClasses : SearchBoxComponentCSSClasses } > ;
35
+ /**
36
+ * Template used for alternative text for the submit button icon. Only accepts a string.
37
+ */
38
+ submitTitle : string ;
35
39
/**
36
40
* Template used for displaying the reset button. Can accept a function or a Hogan string.
37
41
*/
38
42
reset : Template < { cssClasses : SearchBoxComponentCSSClasses } > ;
43
+ /**
44
+ * Template used for alternative text for the reset button icon. Only accepts a string.
45
+ */
46
+ resetTitle : string ;
39
47
/**
40
48
* Template used for displaying the loading indicator. Can accept a function or a Hogan string.
41
49
*/
You can’t perform that action at this time.
0 commit comments