-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add quick search button in navbar
- Loading branch information
1 parent
0b9233d
commit 6b0fffb
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import { NavbarNavItem } from './NavItem'; | ||
import { t } from 'tailchat-shared'; | ||
import { Icon } from 'tailchat-design'; | ||
import { openQuickSwitcher } from '@/components/QuickSwitcher'; | ||
|
||
export const QuickSwitcherNav: React.FC = React.memo(() => { | ||
return ( | ||
<NavbarNavItem | ||
className="bg-gray-700" | ||
name={t('快速搜索、跳转') + ' | ctrl + k'} | ||
onClick={() => { | ||
openQuickSwitcher(); | ||
}} | ||
data-testid="search" | ||
> | ||
<Icon className="text-3xl text-white" icon="mdi:search" /> | ||
</NavbarNavItem> | ||
); | ||
}); | ||
QuickSwitcherNav.displayName = 'QuickSwitcherNav'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters