web-app/components/Field

Small labeled, controlled form controls (Text, Num, Toggle, Select, TextArea, Group). Each takes value + onChange(newValue) so the parent owns state.

Description:
  • Small labeled, controlled form controls (Text, Num, Toggle, Select, TextArea, Group). Each takes value + onChange(newValue) so the parent owns state.

Source:

Methods

(static) Group(props) → {JSX.Element}

Description:
  • Titled section wrapper.

Source:
Parameters:
Name Type Description
props object

{ title, children }.

Returns:
Type
JSX.Element

(static) Num(props) → {JSX.Element}

Description:
  • Labeled number input (emits a Number, or "" when cleared).

Source:
Parameters:
Name Type Description
props object

{ label, value, onChange, step, min, max }.

Returns:
Type
JSX.Element

(static) Select(props) → {JSX.Element}

Description:
  • Labeled select. options are strings or { value, label }.

Source:
Parameters:
Name Type Description
props object

{ label, value, onChange, options }.

Returns:
Type
JSX.Element

(static) Text(props) → {JSX.Element}

Description:
  • Labeled text input.

Source:
Parameters:
Name Type Description
props object

{ label, value, onChange, ...rest }.

Returns:
Type
JSX.Element

(static) TextArea(props) → {JSX.Element}

Description:
  • Labeled textarea.

Source:
Parameters:
Name Type Description
props object

{ label, value, onChange, rows, ...rest }.

Returns:
Type
JSX.Element

(static) Toggle(props) → {JSX.Element}

Description:
  • Labeled checkbox.

Source:
Parameters:
Name Type Description
props object

{ label, value, onChange }.

Returns:
Type
JSX.Element