Skip to content

Commit

Permalink
add search bar
Browse files Browse the repository at this point in the history
  • Loading branch information
lifeparticle committed Sep 26, 2023
1 parent ab02666 commit aa5204b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import FloatingHeader from "components/Layouts/FloatingHeader";
import CookieConsent from "pages/Footer/CookieConsent";
import useTheme from "lib/utils/hooks/useTheme";
import PopupSearch from "components/General/PopupSearch";
import FloatingSearchBar from "components/Layouts/FloatingSearchBar";

const { Content } = Layout;

Expand All @@ -20,6 +21,7 @@ const App: React.FC = () => {
<Sidebar />
<Layout>
<Content>
<FloatingSearchBar />
<FloatingHeader />
<RoutesWithPageTitle />
</Content>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.fsb {
position: absolute;
top: var(--bt-size-8);
right: 200px;
padding: var(--bt-size-4) 0 var(--bt-size-4) 0;
border-radius: var(--bt-size-10);
z-index: var(--bt-z-index-dropdown);
display: flex;
}
16 changes: 16 additions & 0 deletions ui/src/components/Layouts/FloatingSearchBar/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Input } from "antd";
import style from "./FloatingSearchBar.module.scss";
import Icon from "components/General/Icon";
const FloatingSearchBar = () => {
return (
<div className={style.fsb}>
<Input
addonBefore={<Icon name="Search" />}
addonAfter={<>cmd + k</>}
placeholder="Search..."
/>
</div>
);
};

export default FloatingSearchBar;

0 comments on commit aa5204b

Please sign in to comment.