Skip to content

Commit

Permalink
add label and display fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
danilo-leal committed Dec 12, 2023
1 parent c1dc9e8 commit c509684
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 5 additions & 7 deletions docs/src/modules/components/AppSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,6 @@ export default function AppSearch(props) {
return () => {};
}, [isOpen]);

const search = `${t('algoliaSearch')}`;

const optionalFilters = [];
if (pageContext.productId !== 'null') {
optionalFilters.push(`productId:${pageContext.productId}`);
Expand All @@ -423,7 +421,7 @@ export default function AppSearch(props) {
}),
})}
/>
<SearchLabel id="app-search-label">{search}</SearchLabel>
<SearchLabel id="app-search-label">{t('searchButton')}</SearchLabel>
<Shortcut aria-hidden="true">
{/* eslint-disable-next-line material-ui/no-hardcoded-labels */}
{macOS ? '⌘' : 'Ctrl+'}K
Expand Down Expand Up @@ -458,7 +456,7 @@ export default function AppSearch(props) {
analyticsTags: [facetFilterLanguage, `product:${pageContext.productId}`],
hitsPerPage: 40,
}}
placeholder={search}
placeholder={`${t('algoliaSearch')}`}
transformItems={(items) => {
return items.map((item) => {
// `url` contains the domain
Expand Down Expand Up @@ -678,8 +676,8 @@ export default function AppSearch(props) {
color: (theme.vars || theme).palette.text.primary,
},
'& .DocSearch-Hit-path': {
display: 'flex',
gap: theme.spacing(1),
// display: 'flex',
// gap: theme.spacing(1),
fontSize: theme.typography.pxToRem(12),
color: (theme.vars || theme).palette.text.secondary,
},
Expand All @@ -699,7 +697,7 @@ export default function AppSearch(props) {
borderColor: (theme.vars || theme).palette.primary[300],
},
'& .DocSearch-Hit-action, & .DocSearch-Hits mark': {
display: 'flex',
// display: 'flex',
color: (theme.vars || theme).palette.primary[500],
'& .DocSearch-Hit-action-button': {
display: 'flex',
Expand Down
1 change: 1 addition & 0 deletions docs/translations/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
},
"albumDescr": "A responsive album / gallery page layout with a hero unit and footer.",
"albumTitle": "Album",
"searchButton": "Search…",
"algoliaSearch": "What are you looking for?",
"appFrame": {
"changeLanguage": "Change language",
Expand Down

0 comments on commit c509684

Please sign in to comment.