-
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
c96855a
commit d9c4efc
Showing
39 changed files
with
606 additions
and
338 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
auto-install-peers=true |
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
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,11 +1,16 @@ | ||
import type { Icon } from "lucide-react"; | ||
import type { LucideIcon } from "lucide-react"; | ||
|
||
declare global { | ||
type NavItem = { | ||
interface NavigationItem { | ||
label: string; | ||
href?: string; | ||
links?: NavigationItem[]; | ||
Icon?: LucideIcon; | ||
} | ||
|
||
interface NavigationSection { | ||
title: string; | ||
href: string; | ||
isExternal?: boolean; | ||
disabled?: boolean; | ||
icon?: Icon; | ||
}; | ||
links: NavigationItem[]; | ||
Icon?: LucideIcon; | ||
} | ||
} |
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,8 @@ | ||
declare global { | ||
interface HeaderSEOProps { | ||
title?: string; | ||
description?: string; | ||
ogImage?: string; | ||
} | ||
} | ||
export {}; |
File renamed without changes.
File renamed without changes.
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,17 @@ | ||
import { useRouter } from "next/router"; | ||
|
||
import { Icons } from "../Icons"; | ||
|
||
export function GoBackButton() { | ||
const router = useRouter(); | ||
|
||
return ( | ||
<button | ||
className="group inline-flex rounded-md bg-primary-400 p-2 transition-colors duration-100 ease-linear hover:bg-primary-500/70" | ||
onClick={router.back} | ||
type="button" | ||
> | ||
<Icons.GoBack className="text-zinc-100 transition-colors duration-100 ease-linear group-hover:text-zinc-50" /> | ||
</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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
import { | ||
ArrowLeft, | ||
Check, | ||
ChevronDown, | ||
ChevronUp, | ||
Github, | ||
Link, | ||
LucideIcon, | ||
X | ||
} from "lucide-react"; | ||
|
||
export type Icon = LucideIcon; | ||
|
||
export const Icons = { | ||
Check: Check, | ||
ChevronDown: ChevronDown, | ||
ChevronUp: ChevronUp, | ||
Close: X, | ||
Github: Github, | ||
GoBack: ArrowLeft, | ||
Link: Link | ||
}; |
This file was deleted.
Oops, something went wrong.
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,61 @@ | ||
import { forwardRef, InputHTMLAttributes } from "react"; | ||
import { FieldError } from "react-hook-form"; | ||
import clsx from "clsx"; | ||
|
||
interface InputProps extends InputHTMLAttributes<HTMLInputElement> { | ||
error?: FieldError; | ||
label: string; | ||
} | ||
|
||
export const Input = forwardRef<HTMLInputElement, InputProps>( | ||
({ className, error, label, name, placeholder, type, ...props }, ref) => { | ||
return ( | ||
<div className="flex flex-col gap-y-0.5"> | ||
<div className="flex justify-between"> | ||
<label htmlFor={name}>{label}</label> | ||
{error ? ( | ||
<p className="font-grotesk text-red-600 text-sm mt-auto"> | ||
{error.message} | ||
</p> | ||
) : null} | ||
</div> | ||
<input | ||
className={clsx( | ||
`border border-primary-200/25 px-2 py-1 h-10 outline-none rounded-md bg-zinc-100 placeholder:text-zinc-400 file:bg-primary-500 file:text-zinc-50 file:mr-2 file:transition-all file:py-1 file:px-2 file:h-full file:-ml-1 file:rounded-md file:border-0 file:text-sm file:font-semibold hover:file:bg-primary-600 focus:ring-2 focus:ring-primary-400 focus:ring-offset-2 focus:ring-offset-zinc-200 ${className}`, | ||
{ | ||
"border-red-600 focus:ring-red-500": error | ||
} | ||
)} | ||
min={type === "number" ? "0" : undefined} | ||
step={type === "number" ? "0.1" : undefined} | ||
placeholder={type === "number" ? "0" : placeholder} | ||
autoComplete={type === "number" ? "off" : "auto"} | ||
onKeyDown={ | ||
type === "number" | ||
? (event) => { | ||
if ( | ||
![ | ||
"Backspace", | ||
"Tab", | ||
"ArrowUp", | ||
"ArrowDown", | ||
"ArrowLeft", | ||
"ArrowRight" | ||
].includes(event.key) && | ||
!event.key.match(/^\d*\.?\d*$/) | ||
) { | ||
event.preventDefault(); | ||
} | ||
} | ||
: undefined | ||
} | ||
id={name} | ||
name={name} | ||
ref={ref} | ||
type={type} | ||
{...props} | ||
/> | ||
</div> | ||
); | ||
} | ||
); |
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
Oops, something went wrong.