Remove homeserver input

This commit is contained in:
Robert Long
2021-12-15 10:54:01 -08:00
parent 81144a7421
commit 382ca2baa4
4 changed files with 14 additions and 13 deletions

View File

@@ -22,14 +22,16 @@ export function Field({ children, className, ...rest }) {
}
export const InputField = forwardRef(
({ id, label, className, type, checked, ...rest }, ref) => {
({ id, label, className, type, checked, prefix, suffix, ...rest }, ref) => {
return (
<Field
className={classNames(
type === "checkbox" ? styles.checkboxField : styles.inputField,
{ [styles.prefix]: !!prefix },
className
)}
>
{prefix && <span>{prefix}</span>}
<input id={id} {...rest} ref={ref} type={type} checked={checked} />
<label htmlFor={id}>
{type === "checkbox" && (
@@ -39,6 +41,7 @@ export const InputField = forwardRef(
)}
{label}
</label>
{suffix && <span>{suffix}</span>}
</Field>
);
}