Skip to content

Commit

Permalink
Merge pull request #7 from dylants/ui_tweaks
Browse files Browse the repository at this point in the history
polish: ui tweaks
  • Loading branch information
dylants authored Jan 20, 2024
2 parents 15dc1fe + 73c311d commit 433abe9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions src/app/add/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ function AddBookFormInput({
{fieldNameToDisplay}
</label>
<Input
className={clsx(errors[fieldName] && "border-red-500")}
className={clsx(
errors[fieldName] && "border-red-500",
"border rounded-sm border-customPalette-200",
)}
type="text"
{...register(fieldName, { required: true })}
/>
Expand All @@ -64,7 +67,7 @@ export default function AddBookPage() {
genre: lookupBook?.genre || "",
imageUrl: lookupBook?.imageUrl,
isbn: lookupBook?.isbn || "",
publishedDate: lookupBook?.publishedDate || "",
publishedDate: lookupBook?.publishedDate?.toLocaleDateString?.() || "",
publisher: lookupBook?.publisher || "",
title: lookupBook?.title || "",
},
Expand Down Expand Up @@ -94,9 +97,10 @@ export default function AddBookPage() {
return (
<div>
<h1 className="text-2xl text-customPalette-500 my-4">Add a Book</h1>
<hr className="mt-4 mb-8 border-customPalette-300" />

<form
className="flex flex-col p-4 bg-customPalette-200"
className="flex flex-col p-4 border border-customPalette-300"
onSubmit={handleSubmit(onSubmit)}
>
<div className="flex gap-4 items-end">
Expand All @@ -122,7 +126,7 @@ export default function AddBookPage() {
height={192}
/>
) : (
<div className="border rounded-sm border-customPalette-300 w-[128px] h-[192px] flex justify-center items-center text-slate-900">
<div className="border rounded-sm border-customPalette-200 w-[128px] h-[192px] flex justify-center items-center text-customPalette-500">
No Image
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const buttonVariants = cva(
outline:
"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
secondary:
"bg-customPalette-100 text-customPalette-400 shadow-sm hover:bg-customPalette-100/80",
"bg-customPalette-100 text-customPalette-400 border border-customPalette-300 shadow-sm hover:bg-customPalette-200/20",
},
},
},
Expand Down

0 comments on commit 433abe9

Please sign in to comment.