🎨 style: make the input width full

This commit is contained in:
Wahyu Kurniawan 2024-02-28 21:17:59 +07:00
parent 769593913e
commit eb4ccfbc9c
No known key found for this signature in database
GPG Key ID: 040A1549143A8E33
2 changed files with 5 additions and 3 deletions

View File

@ -8,6 +8,8 @@ export const inputTheme = tv(
'items-center', 'items-center',
'rounded-lg', 'rounded-lg',
'relative', 'relative',
'gap-2',
'w-full',
'placeholder:text-elements-disabled', 'placeholder:text-elements-disabled',
'disabled:cursor-not-allowed', 'disabled:cursor-not-allowed',
'disabled:bg-controls-disabled', 'disabled:bg-controls-disabled',
@ -27,7 +29,7 @@ export const inputTheme = tv(
'disabled:shadow-none', 'disabled:shadow-none',
'disabled:border-none', 'disabled:border-none',
], ],
icon: ['text-elements-mid-em'], icon: ['text-elements-low-em'],
iconContainer: [ iconContainer: [
'absolute', 'absolute',
'inset-y-0', 'inset-y-0',

View File

@ -87,12 +87,12 @@ export const Input = ({
); );
return ( return (
<div className="space-y-2"> <div className="flex flex-col gap-2 w-full">
{renderLabels} {renderLabels}
<div className={containerCls({ class: className })}> <div className={containerCls({ class: className })}>
{leftIcon && renderLeftIcon} {leftIcon && renderLeftIcon}
<input <input
className={cn(inputCls({ class: 'w-80' }), { className={cn(inputCls(), {
'pl-10': leftIcon, 'pl-10': leftIcon,
})} })}
{...props} {...props}