-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ivo
committed
Apr 4, 2023
1 parent
fee3c74
commit ba2a914
Showing
6 changed files
with
67 additions
and
10 deletions.
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 |
---|---|---|
@@ -1,14 +1,26 @@ | ||
import { ButtonHTMLAttributes, FC } from "react"; | ||
import { LucideIcon } from "lucide-react"; | ||
|
||
type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement>; | ||
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> { | ||
LeftIcon?: LucideIcon; | ||
RightIcon?: LucideIcon; | ||
} | ||
|
||
export const Button: FC<ButtonProps> = ({ children, className, ...rest }) => { | ||
export const Button: FC<ButtonProps> = ({ | ||
children, | ||
className, | ||
LeftIcon, | ||
RightIcon, | ||
...rest | ||
}) => { | ||
return ( | ||
<button | ||
className={`p-2 font-bold text-white font-inter items-center justify-center bg-primary-500 w-full flex hover:bg-primary-600 transition-all rounded-md outline-none focus:ring-2 focus:ring-primary-400 focus:ring-offset-2 focus:ring-offset-zinc-200 ${className}`} | ||
className={`p-2 font-bold text-white font-inter items-center justify-center bg-primary-500 flex gap-x-2 hover:bg-primary-600 transition-all rounded-md outline-none focus:ring-2 focus:ring-primary-400 focus:ring-offset-2 focus:ring-offset-zinc-200 ${className}`} | ||
{...rest} | ||
> | ||
{LeftIcon ? <LeftIcon /> : null} | ||
{children} | ||
{RightIcon ? <RightIcon /> : null} | ||
</button> | ||
); | ||
}; |
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,26 @@ | ||
import { ArrowLeft } from "lucide-react"; | ||
import { useRouter } from "next/router"; | ||
|
||
import { Button } from "@app/components/Button"; | ||
import { PageLayout } from "@app/components/Layout/Page"; | ||
|
||
export default function Custom404() { | ||
const router = useRouter(); | ||
|
||
return ( | ||
<PageLayout title="common:errors.404.title"> | ||
<div className="m-auto flex flex-col gap-y-2"> | ||
<h1 className="text-[8rem] font-bold font-grotesk text-center">404</h1> | ||
<p className="text-xl font-medium font-grotesk text-center"> | ||
common:errors.404.description | ||
</p> | ||
<Button | ||
LeftIcon={ArrowLeft} | ||
onClick={() => router.replace("/")} | ||
> | ||
common:errors.404.back-to-home | ||
</Button> | ||
</div> | ||
</PageLayout> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
import { Input } from "@app/components/Input"; | ||
import { HeaderSEO } from "@app/components/Layout/HeaderSEO"; | ||
import { PageLayout } from "@app/components/Layout/Page"; | ||
|
||
export default function Home() { | ||
return ( | ||
<section className="flex flex-col gap-y-4"> | ||
<HeaderSEO /> | ||
<PageLayout title="pages:home.title"> | ||
<Input | ||
label="Label" | ||
type="text" | ||
/> | ||
</section> | ||
</PageLayout> | ||
); | ||
} |
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