Skip to content

Commit

Permalink
Merge pull request #16 from BookHive-ufcg/feat/search-bar
Browse files Browse the repository at this point in the history
Search bar
  • Loading branch information
AmiltonCabral authored Aug 28, 2024
2 parents 3be7a19 + 8c2e912 commit 38a4951
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 6 deletions.
8 changes: 7 additions & 1 deletion src/app/search/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import SearchBar from "@/components/SearchBar";

export default function Search() {
return <main></main>;
return (
<main>
<SearchBar placeholder="Title, author or ISBN" />
</main>
);
}
15 changes: 15 additions & 0 deletions src/components/SearchBar/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { FiSearch } from "react-icons/fi";
import styles from "./profile.module.css";

type SearchBarProps = {
placeholder?: string;
};

export default function SearchBar({ placeholder }: SearchBarProps) {
return (
<div className={styles.searchBar}>
<FiSearch className={styles.icon} />
<input type="text" placeholder={placeholder} className={styles.input} />
</div>
);
}
22 changes: 22 additions & 0 deletions src/components/SearchBar/profile.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.searchBar {
display: flex;
align-items: center;
background-color: #d3d3d3;
border-radius: 12px;
padding: 10px 15px;
width: 300px;
}

.icon {
color: #555;
font-size: 24px;
margin-right: 10px;
}

.input {
border: none;
background-color: transparent;
outline: none;
font-size: 16px;
color: #555;
}
9 changes: 4 additions & 5 deletions src/components/Title/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ import React from "react";
import styles from "./title.module.css";
import BookSection from "../BookSection";

export default function Title({
titleText,
subTitleText,
}: {
type TitleProps = {
titleText: string;
subTitleText: string;
}) {
};

export default function Title({ titleText, subTitleText }: TitleProps) {
return (
<div className={styles.title}>
<h1 className={styles.titleText}>{titleText}</h1>
Expand Down

1 comment on commit 38a4951

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for bookhive-web ready!

✅ Preview
https://bookhive-2wexdrp0t-amiltoncabrals-projects.vercel.app

Built with commit 38a4951.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.