Skip to content

Commit

Permalink
fix: search bar width and padding
Browse files Browse the repository at this point in the history
  • Loading branch information
aacmal committed Jun 26, 2023
1 parent a3f5afc commit 4d0fbd8
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export default function RootLayout({ children }) {
>
<Toaster
toastOptions={{
className: 'border border-emerald-500 text-slate-900 font-semibold',
className:
'border border-emerald-500 text-slate-900 font-semibold dark:bg-slate-700 dark:text-slate-100 text-sm',
}}
/>
<ThemeHandler />
Expand Down
2 changes: 1 addition & 1 deletion src/app/quran/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function HomePage({ children }) {
}

return (
<Wrapper className="px-5 2xl:px-0">
<Wrapper className="px-0 xl:px-5 2xl:px-0">
<ReadQuranHeader />
<BookmarkedVerseLists />
<div
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/ReadQuranHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Search from '@components/Search';
type Props = {};

const ReadQuranHeader = (props: Props) => {
return <Header search={<Search className="max-w-3xl" />}>Baca Quran</Header>;
return <Header search={<Search />}>Baca Quran</Header>;
};

export default ReadQuranHeader;
4 changes: 2 additions & 2 deletions src/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ type HeaderProps = {

const Header = ({ className, children, search }: HeaderProps) => {
return (
<div className="flex lg:justify-between lg:items-center lg:flex-row flex-col px-5 xl:px-0">
<div className="w-full flex justify-between lg:pr-5">
<div className="flex md:justify-between md:items-center md:flex-row flex-col px-5 xl:px-0">
<div className="w-full flex justify-between md:pr-5">
<h1
className={classNames(
'text-xl font-bold text-emerald-500',
Expand Down
6 changes: 5 additions & 1 deletion src/components/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import useStore from '../../store/surahStore';
import Link from 'next/link';
import { LocalChapter } from 'data/chapter/type';

const Search = ({ className }) => {
type SearchProps = {
className?: string;
};

const Search = ({ className }: SearchProps) => {
const allChapters = useStore((state) => state.chapterData);
const notFound = {
id: null,
Expand Down
1 change: 0 additions & 1 deletion src/components/TopBar/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const TopBar = () => {
shallow
);
const pathname = usePathname();
console.log(pathname);

const { currentChapter } = useQuranReader(
(state) => ({
Expand Down

1 comment on commit 4d0fbd8

@vercel
Copy link

@vercel vercel bot commented on 4d0fbd8 Jun 26, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

pustaka-islam – ./

pustakaislam.vercel.app
pustaka-islam-axcamz.vercel.app
pustaka-islam-git-master-axcamz.vercel.app

Please sign in to comment.