mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 07:37:19 +02:00
feat: customizable search placeholder (#1126)
* feat: customizable search placeholder * prettier
This commit is contained in:
parent
711c15d3e3
commit
c6f3f0958d
2 changed files with 17 additions and 2 deletions
|
@ -131,13 +131,14 @@ class HeaderNav extends React.Component {
|
|||
let docGroupActive = false;
|
||||
if (link.search && this.props.config.algolia) {
|
||||
// return algolia search bar
|
||||
const placeholder = this.props.config.algolia.placeholder || 'Search';
|
||||
return (
|
||||
<li className="navSearchWrapper reactNavSearchWrapper" key="search">
|
||||
<input
|
||||
id="search_input_react"
|
||||
type="text"
|
||||
placeholder="Search"
|
||||
title="Search"
|
||||
placeholder={placeholder}
|
||||
title={placeholder}
|
||||
/>
|
||||
</li>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue