diff --git a/frontend/src/ui/components/Field.tsx b/frontend/src/ui/components/Field.tsx index 6f0699c..869d2e2 100644 --- a/frontend/src/ui/components/Field.tsx +++ b/frontend/src/ui/components/Field.tsx @@ -2,12 +2,30 @@ import React from 'react'; export interface FieldProps { name?: string; + className?: string; + horizontal?: boolean; } -function Field({ name, children }: React.PropsWithChildren) { +function Field({ + name, + className, + horizontal, + children, +}: React.PropsWithChildren) { + let classes = className ?? ''; + if (horizontal) { + classes += ' is-horizontal'; + } + let nameEl = null; + if (name) { + nameEl = ; + if (horizontal) { + nameEl =
{nameEl}
; + } + } return ( -
- {name ? : null} +
+ {nameEl} {children}
);