Skip to content

Commit 3c3c46c

Browse files
committed
CSS for questions list, new, edit
1 parent 6f5e27b commit 3c3c46c

File tree

8 files changed

+22
-16
lines changed

8 files changed

+22
-16
lines changed

peerprep/app/layout.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { Metadata } from "next";
22
import "./globals.css";
33
import Navbar from "@/components/navbar/Navbar";
4-
54
import ThemeProvider from "./theme-provider";
65

76
export const metadata: Metadata = {
@@ -19,7 +18,7 @@ export default function RootLayout({
1918
<body>
2019
<ThemeProvider>
2120
<Navbar />
22-
<main className="flex-grow overflow-y-auto">{children}</main>
21+
<main className="flex-1 overflow-y-auto p-4">{children}</main>
2322
</ThemeProvider>
2423
</body>
2524
</html>

peerprep/app/questions/QuestionForm.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,12 @@ const QuestionForm = ({ form, onSubmit }: QuestionFormProps) => {
124124
</FormItem>
125125
)}
126126
/>
127-
<Button type="submit">Submit</Button>
127+
<Button
128+
type="submit"
129+
className={"border-blue-800 bg-blue-700 text-white hover:bg-blue-800"}
130+
>
131+
Submit
132+
</Button>
128133
</form>
129134
</Form>
130135
);

peerprep/app/questions/edit/[question]/EditQuestion.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ const EditQuestion = ({ question }: { question: Question }) => {
4040
};
4141

4242
return (
43-
<div className="flex h-screen items-center justify-center">
44-
<div className="flex w-2/3 max-w-xl flex-col content-center">
43+
<div className="flex h-screen justify-center">
44+
<div className="w-2/3">
4545
<QuestionForm form={form} onSubmit={onSubmit} />
4646
</div>
4747
</div>

peerprep/app/questions/new/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ const NewQuestion = () => {
3636
};
3737

3838
return (
39-
<div className="flex h-screen items-center justify-center">
40-
<div className="flex w-2/3 max-w-xl flex-col content-center">
39+
<div className="flex h-screen justify-center">
40+
<div className="w-2/3">
4141
<QuestionForm form={form} onSubmit={onSubmit} />
4242
</div>
4343
</div>

peerprep/app/questions/page.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ async function QuestionsPage() {
2424
<UserInfoProvider userData={userData}>
2525
<QuestionFilterProvider>
2626
<div className="flex h-screen flex-col overflow-hidden">
27-
<div className="sticky top-0">
28-
<Matchmaking />
29-
</div>
27+
<Matchmaking />
3028
<div className="flex-grow overflow-y-auto">
3129
<QuestionList questions={questions as unknown as Question[]} />
3230
</div>

peerprep/components/modifyQuestion/Tiptap.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,15 @@ const Tiptap = ({ defaultContent, onChange }: TipTapProps) => {
3636
});
3737

3838
return (
39-
<div className="flex min-h-80 flex-col">
39+
<div className="flex flex-col">
4040
<MenuBar editor={editor} />
4141

42-
<EditorContent
43-
editor={editor}
44-
className="flex h-full flex-1 resize-y flex-col overflow-y-auto overflow-x-hidden rounded-md border bg-[#121212] p-2"
45-
/>
42+
<div className="h-80 resize-y">
43+
<EditorContent
44+
editor={editor}
45+
className="h-full flex-1 overflow-y-auto rounded-md border bg-[#121212] p-2"
46+
/>
47+
</div>
4648
</div>
4749
);
4850
};

peerprep/components/ui/tags.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const InputTags = React.forwardRef<HTMLInputElement, InputTagsProps>(
4242
<div
4343
className={cn(
4444
// caveat: :has() variant requires tailwind v3.4 or above: https://tailwindcss.com/blog/tailwindcss-v3-4#new-has-variant
45-
"flex min-h-10 w-full flex-wrap gap-2 rounded-md border border-black px-3 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-50 has-[:focus-visible]:outline-none has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-neutral-950 has-[:focus-visible]:ring-offset-2",
45+
"flex min-h-10 w-full flex-wrap gap-2 rounded-md border border-white px-3 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-50 has-[:focus-visible]:outline-none has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-neutral-950 has-[:focus-visible]:ring-offset-2",
4646
className,
4747
)}
4848
>

peerprep/style/tiptap.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.ProseMirror {
22
flex: 1;
3+
height: 100%;
4+
max-height: 100%;
35
}
46

57
.tiptap {

0 commit comments

Comments
 (0)