Skip to content

Commit 41ab70c

Browse files
Changed placeholder text (npm#273)
1 parent 7a51086 commit 41ab70c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

theme/src/components/mobile-search.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import useSearch from '../use-search'
99
import DarkButton from './dark-button'
1010
import DarkTextInput from './dark-text-input'
1111
import SearchResults from './search-results'
12+
import useSiteMetadata from '../use-site-metadata'
1213

1314
function stateReducer(state, changes) {
1415
switch (changes.type) {
@@ -29,6 +30,7 @@ function stateReducer(state, changes) {
2930
function MobileSearch({isOpen, onDismiss}) {
3031
const [query, setQuery] = React.useState('')
3132
const results = useSearch(query)
33+
const siteMetadata = useSiteMetadata()
3234

3335
function handleDismiss() {
3436
setQuery('')
@@ -90,7 +92,7 @@ function MobileSearch({isOpen, onDismiss}) {
9092
>
9193
<DarkTextInput
9294
{...getInputProps({
93-
placeholder: `Search`,
95+
placeholder: `Search ${siteMetadata.title}`,
9496
width: '100%',
9597
})}
9698
/>

0 commit comments

Comments
 (0)