diff --git a/app/soapbox/components/ui/form-group/form-group.tsx b/app/soapbox/components/ui/form-group/form-group.tsx index e70bc5836..e90448e8c 100644 --- a/app/soapbox/components/ui/form-group/form-group.tsx +++ b/app/soapbox/components/ui/form-group/form-group.tsx @@ -3,7 +3,7 @@ import { v4 as uuidv4 } from 'uuid'; interface IFormGroup { /** Input label message. */ - labelText: React.ReactNode, + labelText?: React.ReactNode, /** Input hint message. */ hintText?: React.ReactNode, /** Input errors. */ @@ -26,13 +26,15 @@ const FormGroup: React.FC = (props) => { return (
- + {labelText && ( + + )}
{firstChild} @@ -47,11 +49,11 @@ const FormGroup: React.FC = (props) => {

)} - {hintText ? ( + {hintText && (

{hintText}

- ) : null} + )}
); diff --git a/app/soapbox/components/ui/textarea/textarea.tsx b/app/soapbox/components/ui/textarea/textarea.tsx index fbd8ba86f..b181fc848 100644 --- a/app/soapbox/components/ui/textarea/textarea.tsx +++ b/app/soapbox/components/ui/textarea/textarea.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames'; import React from 'react'; -interface ITextarea extends Pick, 'maxLength' | 'onChange' | 'required' | 'disabled'> { +interface ITextarea extends Pick, 'maxLength' | 'onChange' | 'required' | 'disabled' | 'rows'> { /** Put the cursor into the input on mount. */ autoFocus?: boolean, /** The initial text in the input. */ @@ -16,11 +16,13 @@ interface ITextarea extends Pick) => { + ({ isCodeEditor = false, hasError = false, ...props }: ITextarea, ref: React.ForwardedRef) => { return (