chore: UX Fixes (#26643)
* Copy changes
* Move search bar inline with new button
* Get rid of no more results message
* Change hidden badge to (hidden)
* Remove Cal.ai badge from sidebar
* Add dropdown to create button when there is multiple options
* Fix delete dialog
* Saved filters updates
* More string fixes
* Switch members table to use names
* Fix member spacing
* Fix routing form identifier field
* Fix routing forms stuff
* Only show SMS hint on SMS options
* Make workflow delete button minimal
* Fix padding on workflow steps
* Remove min width on workflow title
* Fix delete workflow PR
* Fix org profile buttons
* Fix org profile screen partially scrolled down
* Improve logos & banner uploads
* Personal profile fixes
* Fix settings general view stuff
* Sentence case consistency
* Fix stuff I broke
* Fix fab
* Fix hidden translation string
* Fix text fields
* Make button small for solo users too
* fix: update E2E tests to match sentence case labels in routing forms
* fix: update tests to match sentence case label changes
- insights.e2e.ts: chart titles (14 strings)
- event-types.e2e.ts: Organizer phone number location
- EditLocationDialog.test.tsx: phone number labels
* fix: address Cubic AI review feedback (confidence 9+)
- Replace hardcoded text-gray-500 with text-muted in TextField.tsx hint section
- Replace text locator with data-testid in E2E test for location select
Co-Authored-By: unknown <>
* fix: update E2E tests for sentence case label changes
- Use data-testid selectors for location options (more reliable than text)
- Update field identifiers in routing-forms tests to match new labels
- Fix Long text selector in manage-booking-questions test
* fix: replace text locator with data-testid in manage-booking-questions E2E test
Replace fragile text="Long text" locator with resilient
page.getByTestId("select-option-textarea") selector per E2E best practices.
Addresses Cubic AI review feedback (confidence 9/10).
Co-Authored-By: unknown <>
* fix: use .last() for multiple location select items
---------
Co-authored-by: Pedro Castro <[email protected]>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
31 files changed
+3350
-1887
No files matched your search
@@ -23,7 +23,7 @@ export const EmptyState = ({
|
||||
buttonDataTestId,
|
||||
}: EmptyStateProps) => {
|
||||
return (
|
||||
<div className="border-sublte bg-cal-muted flex flex-col items-center gap-6 rounded-xl border p-11">
|
||||
<div className="border-subtle bg-cal-muted flex flex-col items-center gap-6 rounded-xl border p-11">
|
||||
<div className="mb-3 grid">
|
||||
{/* Icon card - Top */}
|
||||
<div className="bg-default border-subtle z-30 col-start-1 col-end-1 row-start-1 row-end-1 h-10 w-10 transform rounded-md border shadow-sm">
|
||||
@@ -47,7 +47,9 @@ export const EmptyState = ({
|
||||
/>
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<h1 className="text-emphasis line-clamp-1 text-center text-lg font-semibold">{header}</h1>
|
||||
<h1 className="text-emphasis line-clamp-1 text-center text-lg font-semibold">
|
||||
{header}
|
||||
</h1>
|
||||
<p className="mt-2 line-clamp-1 text-center text-sm leading-normal transition-all duration-200 ease-in-out hover:line-clamp-none">
|
||||
{text}
|
||||
</p>
|
||||
@@ -56,7 +58,8 @@ export const EmptyState = ({
|
||||
data-testid={buttonDataTestId}
|
||||
StartIcon={buttonStartIcon}
|
||||
onClick={buttonOnClick}
|
||||
className={buttonClassName}>
|
||||
className={buttonClassName}
|
||||
>
|
||||
{buttonText}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -22,7 +22,7 @@ export const isValidRoutingFormFieldType = (type: string): type is RoutingFormFi
|
||||
|
||||
export const FieldTypes = [
|
||||
{
|
||||
label: "Short Text",
|
||||
label: "Short text",
|
||||
value: RoutingFormFieldType.TEXT,
|
||||
},
|
||||
{
|
||||
@@ -30,15 +30,15 @@ export const FieldTypes = [
|
||||
value: RoutingFormFieldType.NUMBER,
|
||||
},
|
||||
{
|
||||
label: "Long Text",
|
||||
label: "Long text",
|
||||
value: RoutingFormFieldType.TEXTAREA,
|
||||
},
|
||||
{
|
||||
label: "Single Selection",
|
||||
label: "Single-choice selection",
|
||||
value: RoutingFormFieldType.SINGLE_SELECT,
|
||||
},
|
||||
{
|
||||
label: "Multiple Selection",
|
||||
label: "Multiple choice selection",
|
||||
value: RoutingFormFieldType.MULTI_SELECT,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -3,15 +3,15 @@ import { RouteActionType } from "../zod";
|
||||
|
||||
export const RoutingPages: { label: string; value: NonNullable<LocalRoute["action"]>["type"] }[] = [
|
||||
{
|
||||
label: "Custom Page",
|
||||
label: "Custom page",
|
||||
value: RouteActionType.CustomPageMessage,
|
||||
},
|
||||
{
|
||||
label: "External Redirect",
|
||||
label: "External redirect",
|
||||
value: RouteActionType.ExternalRedirectUrl,
|
||||
},
|
||||
{
|
||||
label: "Event Redirect",
|
||||
label: "Event redirect",
|
||||
value: RouteActionType.EventTypeRedirectUrl,
|
||||
},
|
||||
];
|
||||
@@ -271,11 +271,11 @@ test.describe("Routing Forms", () => {
|
||||
label: "Test Field",
|
||||
});
|
||||
const queryString =
|
||||
"firstField=456&Test-Field-Number=456&Test-Field-Single-Selection=456&Test-Field-Multiple-Selection=456&Test-Field-Multiple-Selection=789&Test-Field-Phone=456&[email protected]";
|
||||
"firstField=456&Test-Field-Number=456&Test-Field-Single-choice-selection=456&Test-Field-Multiple-choice-selection=456&Test-Field-Multiple-choice-selection=789&Test-Field-Phone=456&[email protected]";
|
||||
|
||||
await gotoRoutingLink({ page, queryString });
|
||||
|
||||
await page.fill('[data-testid="form-field-Test-Field-Long-Text"]', "manual-fill");
|
||||
await page.fill('[data-testid="form-field-Test-Field-Long-text"]', "manual-fill");
|
||||
|
||||
await expect(page.locator('[data-testid="form-field-firstField"]')).toHaveValue("456");
|
||||
await expect(page.locator('[data-testid="form-field-Test-Field-Number"]')).toHaveValue("456");
|
||||
@@ -301,9 +301,9 @@ test.describe("Routing Forms", () => {
|
||||
|
||||
// All other params come from prefill URL
|
||||
expect(url.searchParams.get("Test-Field-Number")).toBe("456");
|
||||
expect(url.searchParams.get("Test-Field-Long-Text")).toBe("manual-fill");
|
||||
expect(url.searchParams.get("Test-Field-Multiple-Selection")).toBe("456");
|
||||
expect(url.searchParams.getAll("Test-Field-Multiple-Selection")).toMatchObject(["456", "789"]);
|
||||
expect(url.searchParams.get("Test-Field-Long-text")).toBe("manual-fill");
|
||||
expect(url.searchParams.get("Test-Field-Multiple-choice-selection")).toBe("456");
|
||||
expect(url.searchParams.getAll("Test-Field-Multiple-choice-selection")).toMatchObject(["456", "789"]);
|
||||
expect(url.searchParams.get("Test-Field-Phone")).toBe("456");
|
||||
expect(url.searchParams.get("Test-Field-Email")).toBe("[email protected]");
|
||||
});
|
||||
@@ -1060,7 +1060,7 @@ async function addAllTypesOfFieldsAndSaveForm(
|
||||
|
||||
const { optionsInUi: fieldTypesList } = await verifySelectOptions(
|
||||
{ selector: ".data-testid-field-type", nth: 0 },
|
||||
["Email", "Long Text", "Multiple Selection", "Number", "Phone", "Single Selection", "Short Text"],
|
||||
["Email", "Long text", "Multiple choice selection", "Number", "Phone", "Single-choice selection", "Short text"],
|
||||
page
|
||||
);
|
||||
|
||||
@@ -1083,7 +1083,7 @@ async function addAllTypesOfFieldsAndSaveForm(
|
||||
identifier = "firstField";
|
||||
}
|
||||
|
||||
if (fieldTypeLabel === "Multiple Selection" || fieldTypeLabel === "Single Selection") {
|
||||
if (fieldTypeLabel === "Multiple choice selection" || fieldTypeLabel === "Single-choice selection") {
|
||||
await page.fill(`[data-testid="fields.${nth}.options.0-input"]`, "123");
|
||||
await page.fill(`[data-testid="fields.${nth}.options.1-input"]`, "456");
|
||||
await page.fill(`[data-testid="fields.${nth}.options.2-input"]`, "789");
|
||||
|
||||
@@ -46,7 +46,7 @@ export async function addOneFieldAndDescriptionAndSaveForm(
|
||||
// Verify all Options of SelectBox
|
||||
const { optionsInUi: types } = await verifySelectOptions(
|
||||
{ selector: ".data-testid-field-type", nth: 0 },
|
||||
["Email", "Long Text", "Multiple Selection", "Number", "Phone", "Single Selection", "Short Text"],
|
||||
["Email", "Long text", "Multiple choice selection", "Number", "Phone", "Single-choice selection", "Short text"],
|
||||
page
|
||||
);
|
||||
|
||||
|
||||
@@ -243,6 +243,7 @@ export const listMembersHandler = async ({ ctx, input }: GetOptions) => {
|
||||
select: {
|
||||
id: true,
|
||||
username: true,
|
||||
name: true,
|
||||
profiles: {
|
||||
select: {
|
||||
organizationId: true,
|
||||
@@ -313,6 +314,7 @@ export const listMembersHandler = async ({ ctx, input }: GetOptions) => {
|
||||
return {
|
||||
id: user.id,
|
||||
username: user.profiles[0]?.username || user.username,
|
||||
name: user.name,
|
||||
email: user.email,
|
||||
timeZone: user.timeZone,
|
||||
role: membership.role,
|
||||
|
||||
@@ -20,7 +20,9 @@ export type ConfirmationDialogContentProps = {
|
||||
variety?: "danger" | "warning" | "success";
|
||||
} & ConfirmBtnType;
|
||||
|
||||
export function ConfirmationDialogContent(props: PropsWithChildren<ConfirmationDialogContentProps>) {
|
||||
export function ConfirmationDialogContent(
|
||||
props: PropsWithChildren<ConfirmationDialogContentProps>
|
||||
) {
|
||||
return (
|
||||
<DialogContent type="creation">
|
||||
<ConfirmationContent {...props} />
|
||||
@@ -28,7 +30,9 @@ export function ConfirmationDialogContent(props: PropsWithChildren<ConfirmationD
|
||||
);
|
||||
}
|
||||
|
||||
export const ConfirmationContent = (props: PropsWithChildren<ConfirmationDialogContentProps>) => {
|
||||
export const ConfirmationContent = (
|
||||
props: PropsWithChildren<ConfirmationDialogContentProps>
|
||||
) => {
|
||||
const { t } = useLocale();
|
||||
const {
|
||||
title,
|
||||
@@ -49,7 +53,10 @@ export const ConfirmationContent = (props: PropsWithChildren<ConfirmationDialogC
|
||||
<div className="mt-0.5 ltr:mr-3">
|
||||
{variety === "danger" && (
|
||||
<div className="bg-error mx-auto rounded-full p-2 text-center">
|
||||
<Icon name="circle-alert" className="h-5 w-5 text-red-600 dark:text-red-100" />
|
||||
<Icon
|
||||
name="circle-alert"
|
||||
className="h-5 w-5 text-red-600 dark:text-red-100"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{variety === "warning" && (
|
||||
@@ -65,7 +72,7 @@ export const ConfirmationContent = (props: PropsWithChildren<ConfirmationDialogC
|
||||
</div>
|
||||
)}
|
||||
<div className="w-full">
|
||||
<DialogPrimitive.Title className="font-cal text-emphasis mt-2 text-xl">
|
||||
<DialogPrimitive.Title className="font-cal text-emphasis mt-1 text-xl">
|
||||
{title}
|
||||
</DialogPrimitive.Title>
|
||||
<DialogPrimitive.Description asChild>
|
||||
@@ -81,7 +88,8 @@ export const ConfirmationContent = (props: PropsWithChildren<ConfirmationDialogC
|
||||
color="primary"
|
||||
loading={isPending}
|
||||
onClick={(e) => onConfirm && onConfirm(e)}
|
||||
data-testid="dialog-confirmation">
|
||||
data-testid="dialog-confirmation"
|
||||
>
|
||||
{isPending ? loadingText : confirmBtnText}
|
||||
</DialogClose>
|
||||
)}
|
||||
|
||||
@@ -61,7 +61,11 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(function Input(
|
||||
<input
|
||||
{...props}
|
||||
ref={ref}
|
||||
className={classNames(inputStyles({ size }), isFullWidth && "w-full", className)}
|
||||
className={classNames(
|
||||
inputStyles({ size }),
|
||||
isFullWidth && "w-full",
|
||||
className
|
||||
)}
|
||||
/>
|
||||
);
|
||||
});
|
||||
@@ -87,161 +91,189 @@ const Addon = ({
|
||||
onClick={onClickAddon && onClickAddon}
|
||||
className={classNames(
|
||||
"flex shrink-0 items-center justify-center whitespace-nowrap",
|
||||
onClickAddon && "pointer-events-auto cursor-pointer disabled:hover:cursor-not-allowed",
|
||||
onClickAddon &&
|
||||
"pointer-events-auto cursor-pointer disabled:hover:cursor-not-allowed",
|
||||
className
|
||||
)}>
|
||||
)}
|
||||
>
|
||||
<span
|
||||
className={classNames(
|
||||
"text-sm font-medium leading-none",
|
||||
error ? "text-error" : "text-muted peer-disabled:opacity-50"
|
||||
)}>
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
|
||||
export const InputField = forwardRef<HTMLInputElement, InputFieldProps>(function InputField(props, ref) {
|
||||
const id = useId();
|
||||
const { t: _t, isLocaleReady, i18n } = useLocale();
|
||||
const t = props.t || _t;
|
||||
const name = props.name || "";
|
||||
const {
|
||||
label = t(name),
|
||||
labelProps,
|
||||
labelClassName,
|
||||
disabled,
|
||||
LockedIcon,
|
||||
placeholder = isLocaleReady && i18n.exists(`${name}_placeholder`) ? t(`${name}_placeholder`) : "",
|
||||
className,
|
||||
addOnLeading,
|
||||
addOnSuffix,
|
||||
addOnClassname,
|
||||
inputIsFullWidth,
|
||||
hint,
|
||||
type,
|
||||
hintErrors,
|
||||
labelSrOnly,
|
||||
noLabel,
|
||||
containerClassName,
|
||||
readOnly,
|
||||
showAsteriskIndicator,
|
||||
onClickAddon,
|
||||
export const InputField = forwardRef<HTMLInputElement, InputFieldProps>(
|
||||
function InputField(props, ref) {
|
||||
const id = useId();
|
||||
const { t: _t, isLocaleReady, i18n } = useLocale();
|
||||
const t = props.t || _t;
|
||||
const name = props.name || "";
|
||||
const {
|
||||
label = t(name),
|
||||
labelProps,
|
||||
labelClassName,
|
||||
disabled,
|
||||
LockedIcon,
|
||||
placeholder = isLocaleReady && i18n.exists(`${name}_placeholder`)
|
||||
? t(`${name}_placeholder`)
|
||||
: "",
|
||||
className,
|
||||
addOnLeading,
|
||||
addOnSuffix,
|
||||
addOnClassname,
|
||||
inputIsFullWidth,
|
||||
hint,
|
||||
type,
|
||||
hintErrors,
|
||||
labelSrOnly,
|
||||
noLabel,
|
||||
containerClassName,
|
||||
readOnly,
|
||||
showAsteriskIndicator,
|
||||
onClickAddon,
|
||||
|
||||
t: __t,
|
||||
dataTestid,
|
||||
size,
|
||||
...passThrough
|
||||
} = props;
|
||||
t: __t,
|
||||
dataTestid,
|
||||
size,
|
||||
...passThrough
|
||||
} = props;
|
||||
|
||||
const [inputValue, setInputValue] = useState<string>("");
|
||||
const [inputValue, setInputValue] = useState<string>("");
|
||||
|
||||
const handleFocusInput = (e: React.MouseEvent<HTMLDivElement>) => {
|
||||
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
||||
};
|
||||
const handleFocusInput = (e: React.MouseEvent<HTMLDivElement>) => {
|
||||
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={classNames(containerClassName)}>
|
||||
{!!name && !noLabel && (
|
||||
<Label
|
||||
htmlFor={id}
|
||||
{...labelProps}
|
||||
className={classNames(labelClassName, labelSrOnly && "sr-only", props.error && "text-error")}>
|
||||
{label}
|
||||
{showAsteriskIndicator && !readOnly && passThrough.required ? (
|
||||
<span className="text-default ml-1 font-medium">*</span>
|
||||
) : null}
|
||||
{LockedIcon}
|
||||
</Label>
|
||||
)}
|
||||
{addOnLeading || addOnSuffix ? (
|
||||
<div
|
||||
dir="ltr"
|
||||
className={classNames(
|
||||
inputStyles({ size }),
|
||||
"group relative mb-1 flex min-w-0 items-center gap-1",
|
||||
"focus-within:shadow-outline-gray-focused focus-within:border-emphasis",
|
||||
"[&:has(:disabled)]:bg-subtle [&:has(:disabled)]:hover:border-default [&:has(:disabled)]:cursor-not-allowed",
|
||||
inputIsFullWidth && "w-full"
|
||||
)}>
|
||||
{addOnLeading && (
|
||||
<Addon
|
||||
size={size ?? "md"}
|
||||
position="start"
|
||||
className={classNames(addOnClassname)}
|
||||
onClickAddon={handleFocusInput}>
|
||||
{addOnLeading}
|
||||
</Addon>
|
||||
)}
|
||||
<input
|
||||
data-testid={dataTestid ? `${dataTestid}-input` : "input-field"}
|
||||
return (
|
||||
<div className={classNames(containerClassName)}>
|
||||
{!!name && !noLabel && (
|
||||
<Label
|
||||
htmlFor={id}
|
||||
{...labelProps}
|
||||
className={classNames(
|
||||
labelClassName,
|
||||
labelSrOnly && "sr-only",
|
||||
props.error && "text-error"
|
||||
)}
|
||||
>
|
||||
{label}
|
||||
{showAsteriskIndicator && !readOnly && passThrough.required ? (
|
||||
<span className="text-default ml-1 font-medium">*</span>
|
||||
) : null}
|
||||
{LockedIcon}
|
||||
</Label>
|
||||
)}
|
||||
{addOnLeading || addOnSuffix ? (
|
||||
<div
|
||||
dir="ltr"
|
||||
className={classNames(
|
||||
inputStyles({ size }),
|
||||
"group relative mb-1 flex min-w-0 items-center gap-1",
|
||||
"focus-within:shadow-outline-gray-focused focus-within:border-emphasis",
|
||||
"[&:has(:disabled)]:bg-subtle [&:has(:disabled)]:hover:border-default [&:has(:disabled)]:cursor-not-allowed",
|
||||
inputIsFullWidth && "w-full"
|
||||
)}
|
||||
>
|
||||
{addOnLeading && (
|
||||
<Addon
|
||||
size={size ?? "md"}
|
||||
position="start"
|
||||
className={classNames(addOnClassname)}
|
||||
onClickAddon={handleFocusInput}
|
||||
>
|
||||
{addOnLeading}
|
||||
</Addon>
|
||||
)}
|
||||
<input
|
||||
data-testid={dataTestid ? `${dataTestid}-input` : "input-field"}
|
||||
id={id}
|
||||
type={type}
|
||||
placeholder={placeholder}
|
||||
className={classNames(
|
||||
"w-full min-w-0 truncate border-0 bg-transparent focus:outline-none focus:ring-0",
|
||||
"text-default rounded-lg text-sm font-medium leading-none",
|
||||
"placeholder:text-muted disabled:cursor-not-allowed disabled:bg-transparent",
|
||||
addOnLeading && "rounded-none pl-0.5 pr-0",
|
||||
addOnSuffix && "pl-0",
|
||||
className
|
||||
)}
|
||||
{...passThrough}
|
||||
{...(type == "search" && {
|
||||
onChange: (e) => {
|
||||
setInputValue(e.target.value);
|
||||
props.onChange?.(e);
|
||||
},
|
||||
value: inputValue,
|
||||
})}
|
||||
disabled={readOnly || disabled}
|
||||
ref={ref}
|
||||
/>
|
||||
{addOnSuffix && (
|
||||
<Addon
|
||||
size={size ?? "md"}
|
||||
position="end"
|
||||
onClickAddon={(e) => {
|
||||
handleFocusInput(e);
|
||||
onClickAddon?.(e);
|
||||
}}
|
||||
className={classNames(addOnClassname)}
|
||||
>
|
||||
{addOnSuffix}
|
||||
</Addon>
|
||||
)}
|
||||
{type === "search" && inputValue?.toString().length > 0 && (
|
||||
<Icon
|
||||
name="x"
|
||||
className="text-subtle absolute top-2.5 h-4 w-4 cursor-pointer ltr:right-2 rtl:left-2"
|
||||
onClick={(e) => {
|
||||
setInputValue("");
|
||||
props.onChange?.(
|
||||
e as unknown as React.ChangeEvent<HTMLInputElement>
|
||||
);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
<Input
|
||||
id={id}
|
||||
type={type}
|
||||
placeholder={placeholder}
|
||||
size={size}
|
||||
className={classNames(
|
||||
"w-full min-w-0 truncate border-0 bg-transparent focus:outline-none focus:ring-0",
|
||||
"w-full min-w-0 truncate focus:outline-none focus:ring-0",
|
||||
"text-default rounded-lg text-sm font-medium leading-none",
|
||||
"placeholder:text-muted disabled:cursor-not-allowed disabled:bg-transparent",
|
||||
"placeholder:text-muted disabled:cursor-not-allowed",
|
||||
addOnLeading && "rounded-none pl-0.5 pr-0",
|
||||
addOnSuffix && !addOnLeading && "pl-0.5",
|
||||
className
|
||||
)}
|
||||
{...passThrough}
|
||||
{...(type == "search" && {
|
||||
onChange: (e) => {
|
||||
setInputValue(e.target.value);
|
||||
props.onChange?.(e);
|
||||
},
|
||||
value: inputValue,
|
||||
})}
|
||||
disabled={readOnly || disabled}
|
||||
readOnly={readOnly}
|
||||
ref={ref}
|
||||
isFullWidth={inputIsFullWidth}
|
||||
disabled={readOnly || disabled}
|
||||
/>
|
||||
{addOnSuffix && (
|
||||
<Addon
|
||||
size={size ?? "md"}
|
||||
position="end"
|
||||
onClickAddon={(e) => {
|
||||
handleFocusInput(e);
|
||||
onClickAddon?.(e);
|
||||
}}
|
||||
className={classNames(addOnClassname)}>
|
||||
{addOnSuffix}
|
||||
</Addon>
|
||||
)}
|
||||
{type === "search" && inputValue?.toString().length > 0 && (
|
||||
<Icon
|
||||
name="x"
|
||||
className="text-subtle absolute top-2.5 h-4 w-4 cursor-pointer ltr:right-2 rtl:left-2"
|
||||
onClick={(e) => {
|
||||
setInputValue("");
|
||||
props.onChange?.(e as unknown as React.ChangeEvent<HTMLInputElement>);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
<Input
|
||||
id={id}
|
||||
type={type}
|
||||
placeholder={placeholder}
|
||||
size={size}
|
||||
className={classNames(
|
||||
className,
|
||||
"disabled:bg-subtle disabled:hover:border-subtle disabled:cursor-not-allowed"
|
||||
)}
|
||||
{...passThrough}
|
||||
readOnly={readOnly}
|
||||
ref={ref}
|
||||
isFullWidth={inputIsFullWidth}
|
||||
disabled={readOnly || disabled}
|
||||
/>
|
||||
)}
|
||||
<HintsOrErrors hintErrors={hintErrors} fieldName={name} t={t} />
|
||||
{hint && <div className="text-default mt-2 flex items-center text-sm">{hint}</div>}
|
||||
</div>
|
||||
);
|
||||
});
|
||||
)}
|
||||
<HintsOrErrors hintErrors={hintErrors} fieldName={name} t={t} />
|
||||
{hint && (
|
||||
<div className="text-muted mt-2 flex items-center text-sm">
|
||||
<Icon name="info" className="text-muted h-4 w-4 mr-1" />
|
||||
{hint}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
export const TextField = forwardRef<HTMLInputElement, InputFieldProps>(function TextField(props, ref) {
|
||||
return <InputField ref={ref} {...props} />;
|
||||
});
|
||||
export const TextField = forwardRef<HTMLInputElement, InputFieldProps>(
|
||||
function TextField(props, ref) {
|
||||
return <InputField ref={ref} {...props} />;
|
||||
}
|
||||
);
|
||||
Reference in new issue
Block a user