Skip to content

Commit

Permalink
change example questions, readonly input and check os
Browse files Browse the repository at this point in the history
  • Loading branch information
junhouse committed Apr 16, 2024
1 parent 66d1aaa commit 2620c3b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
10 changes: 7 additions & 3 deletions components/Search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@ import style from "./Search.module.scss";
import clsx from "clsx";

export default function Search() {
const isMacOS = () => window.navigator.appVersion.includes(`Mac`);
const shortCutPlaceholder = isMacOS ? `(⌘ + K)` : `(ctrl + K)`;

return (
<>
<div className={style.inputContainer}>
<div className={clsx("top-nav-search-bar", style.inputContainer)}>
<svg viewBox="0 0 24 24" focusable="false" className={style.icon}>
<path
fill="currentColor"
d="M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z"
></path>
</svg>
<input
className={clsx("top-nav-search-bar", style.searchBar)}
placeholder={`Search...`}
className={clsx(style.searchBar)}
readOnly={true}
placeholder={`Search ${shortCutPlaceholder}`}
/>
</div>
</>
Expand Down
8 changes: 5 additions & 3 deletions pages/_document.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2620c3b

Please sign in to comment.