Skip to content

Commit

Permalink
added some keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahgm committed May 24, 2024
1 parent 3503704 commit a121aaa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/app/_components/SiteMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ export const SiteMenu = () => {
<Dialog aria-label="Global Command Menu">
<Command
className={classNames.container}
filter={(value, query) => {
if (value.toLowerCase().includes(query)) return 1;
filter={(value, query, keywords) => {
const searchValue = `${value} ${keywords}`;
if (searchValue.toLowerCase().includes(query)) return 1;
return 0;
}}
>
Expand Down Expand Up @@ -180,6 +181,7 @@ export const SiteMenu = () => {
key={page.href}
value={page.href}
onSelect={() => window.open(page.href, '_blank')}
keywords={page.keywords}
>
<Inline space={4} alignY="center">
{page.name}
Expand Down
4 changes: 4 additions & 0 deletions docs/lib/commandlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const links = [
{
name: 'Slack',
href: 'https://reservix.slack.com/archives/C02727BNZ3J',
keywords: ['help'],
},
{
name: 'Jira',
Expand All @@ -13,10 +14,12 @@ export const links = [
{
name: 'Figma Core Kit',
href: 'https://www.figma.com/design/NbTUW9zk15nN8idlfsEttS/%F0%9F%8C%BC-Marigold-CORE?t=VfTLYo5foFEjRxFY-0',
keywords: ['design'],
},
{
name: 'Support Center',
href: 'https://reservix.atlassian.net/servicedesk/customer/portal/77',
keywords: ['help'],
},
{
name: 'Storybook',
Expand All @@ -25,6 +28,7 @@ export const links = [
{
name: 'Starter',
href: 'https://stackblitz.com/edit/github-v1evcv?file=src%2FApp.tsx',
keywords: ['playground'],
},
],
},
Expand Down

0 comments on commit a121aaa

Please sign in to comment.