Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added the borders in cmment and made it look decent, padding and all. #193

Merged
merged 3 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/comment/CommentInputForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const CommentInputForm = ({
<textarea
id="content"
name="content"
className="min-h-[50px] border border-slate-350 rounded-md dark:bg-gray-800 p-2"
className="min-h-[50px] rounded-md dark:bg-gray-800 border-2 text-muted-foreground p-2 "
placeholder="Add a public comment..."
/>
<FormErrors id="content" errors={fieldErrors} />
Expand Down
11 changes: 7 additions & 4 deletions src/components/comment/Comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ const Comments = async ({
</div>
</div>
</CardHeader>
<CardContent className="p-0 lg:p-6">
<CardContent className="p-0 lg:p-8 border dark:border-primary-darker rounded-md">
<CommentInputForm
contentId={content.id}
parentId={data?.parentComment?.id}
/>
<div className="mb-5 flex mt-5">
<div className="mb-5 flex">
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
Expand Down Expand Up @@ -213,7 +213,10 @@ const Comments = async ({
</div>
<div className="grid gap-6 max-h-[400px] overflow-y-auto">
{data.comments.map((c) => (
<div className="text-sm flex items-start gap-4 w-full" key={c.id}>
<div
className="text-sm flex items-start gap-4 w-full border p-4 rounded-md"
key={c.id}
>
<div className="flex items-start gap-4 w-full">
<Avatar className="w-10 h-10 border">
<AvatarImage alt="@shadcn" src="/placeholder-user.jpg" />
Expand Down Expand Up @@ -272,7 +275,7 @@ const Comments = async ({
))}
</div>
</CardContent>
<CardFooter>
<CardFooter className="mt-2">
<Pagination dataLength={data.comments.length} />
</CardFooter>
</Card>
Expand Down
Loading