feat: 添加代码片段创建界面

This commit is contained in:
ngc2207 2024-11-11 11:14:15 +08:00
parent bdfea7b854
commit a910325462
2 changed files with 27 additions and 2 deletions

View File

@ -28,7 +28,7 @@ export default function RootLayout({
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children}
<div className="container mx-auto px-12">{children}</div>
</body>
</html>
);

View File

@ -1,3 +1,28 @@
export default function SnippetCreatePage() {
return <div>Create a Snippet!</div>;
return (
<form>
<h3 className="font-bold m-3">Create a Snippet</h3>
<div className="flex flex-col gap-4">
<div className="flex gap-4">
<label className="w-12" htmlFor="title">
Title
</label>
<input
name="title"
className="border rounded p-2 w-full"
id="title"
/>
</div>
<div className="flex gap-4">
<label className="w-12" htmlFor="title">
Code
</label>
<input name="code" className="border rounded p-2 w-full" id="code" />
</div>
<button type="submit" className="rounded p-2 bg-blue-200">
Create
</button>
</div>
</form>
);
}