Create components/Field.tsx
Browse files
frontend/src/components/Field.tsx
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React from "react";
|
| 2 |
+
|
| 3 |
+
type Props = React.PropsWithChildren<{
|
| 4 |
+
label: string;
|
| 5 |
+
}>;
|
| 6 |
+
|
| 7 |
+
export default function Field({ label, children }: Props) {
|
| 8 |
+
return (
|
| 9 |
+
<label style={{ display: "block", marginBottom: 12 }}>
|
| 10 |
+
<div style={{ fontSize: 12, opacity: 0.8, marginBottom: 6 }}>{label}</div>
|
| 11 |
+
{children}
|
| 12 |
+
</label>
|
| 13 |
+
);
|
| 14 |
+
}
|