v3: fixed authorization bug with stale tokens, fixed private dump access bug, various small fixes across the app
Some checks failed
Build and Publish Docker Image / build-and-push (push) Failing after 20s
Some checks failed
Build and Publish Docker Image / build-and-push (push) Failing after 20s
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useId } from "react";
|
||||
import { type ReactNode, useId } from "react";
|
||||
import {
|
||||
type FieldValues,
|
||||
type Path,
|
||||
@@ -12,6 +12,8 @@ import { charCountClass } from "../../utils/charCount.ts";
|
||||
interface TextFieldProps<T extends FieldValues> {
|
||||
name: Path<T>;
|
||||
label?: string;
|
||||
/** Optional control rendered to the right of the label (e.g. a reset button). */
|
||||
labelAction?: ReactNode;
|
||||
type?: "text" | "email" | "password" | "url" | "search";
|
||||
placeholder?: string;
|
||||
autoComplete?: string;
|
||||
@@ -45,6 +47,7 @@ function CharCounter<T extends FieldValues>(
|
||||
export function TextField<T extends FieldValues>({
|
||||
name,
|
||||
label,
|
||||
labelAction,
|
||||
type = "text",
|
||||
placeholder,
|
||||
autoComplete,
|
||||
@@ -61,10 +64,17 @@ export function TextField<T extends FieldValues>({
|
||||
|
||||
return (
|
||||
<div className="form-field">
|
||||
{label && (
|
||||
<label className="form-label" htmlFor={id}>
|
||||
{label}
|
||||
</label>
|
||||
{(label || labelAction) && (
|
||||
<div className="form-label-row">
|
||||
{label
|
||||
? (
|
||||
<label className="form-label" htmlFor={id}>
|
||||
{label}
|
||||
</label>
|
||||
)
|
||||
: <span />}
|
||||
{labelAction}
|
||||
</div>
|
||||
)}
|
||||
<div className={counted ? "input-with-count" : undefined}>
|
||||
<input
|
||||
|
||||
Reference in New Issue
Block a user