Skip to content

Commit

Permalink
update input
Browse files Browse the repository at this point in the history
  • Loading branch information
Lykhoyda committed Jan 7, 2025
1 parent 2efce9d commit 9362fa4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/web-wallet/src/components/Input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
labelClassName?: string;
inputClassName?: string;
suffix?: string;
id: string;
}

const Input: React.FC<InputProps> = ({
Expand All @@ -17,27 +18,28 @@ const Input: React.FC<InputProps> = ({
labelClassName = '',
inputClassName = '',
suffix = '',
id,
...props
}) => {
return (
<div className={`flex flex-col gap-1 w-full ${containerClassName}`}>
{label && (
<label
htmlFor={props.id}
htmlFor={id}
className={`text-black text-base font-normal leading-normal ${labelClassName}`}
>
{label}
</label>
)}
<div className="h-full flex items-center bg-neutral-50 rounded-xl border border-[#afafaf] p-3">
<input
id={props.id}
className={`flex-grow bg-transparent focus:outline-none text-[#0e0e0e] text-base font-semibold font-inter ${inputClassName}`}
{...props}
aria-describedby={props.id ? `${props.id}-suffix` : undefined}
id={id}
className={`flex-grow bg-transparent focus:outline-none text-[#0e0e0e] text-base font-semibold font-inter ${inputClassName}`}
aria-describedby={`${id}-suffix`}
/>
<span
id={props.id ? `${props.id}-suffix` : undefined}
id={`${id}-suffix`}
className="ml-2 text-[#a9aaab] text-base font-medium leading-normal"
>
{suffix}
Expand Down

0 comments on commit 9362fa4

Please sign in to comment.