import { getAssetPath } from "../../../lib/assetUtils"; import type { InputWithCounterProps } from "./InputWithCounter.types"; export function InputWithCounterView({ label, placeholder, value, onChange, maxLength, showHelpIcon = false, className = "", inputClassName = "", }: InputWithCounterProps) { return (
{/* Label with help icon */} {label && (
{showHelpIcon && ( )}
)} {/* Input field */}
{ if (e.target.value.length <= maxLength) { onChange(e.target.value); } }} maxLength={maxLength} className={`w-full h-[36px] px-[12px] py-[8px] bg-[var(--color-surface-default-primary)] border-2 border-[var(--color-border-default-tertiary)] rounded-[var(--measures-radius-medium,8px)] text-[16px] leading-[24px] text-[var(--color-content-default-primary)] placeholder:text-[var(--color-content-default-tertiary)] focus:outline-none ${inputClassName}`} />
{/* Character counter */}

{value.length}/{maxLength}

); }