feat: 修改样式
This commit is contained in:
@@ -116,7 +116,9 @@ export function EnhancedInput({
|
||||
|
||||
const renderPrefix = () => {
|
||||
return typeof prefix === 'string' ? (
|
||||
<div className='bg-muted relative mr-px flex h-9 items-center text-nowrap px-3'>{prefix}</div>
|
||||
<div className='relative mr-px flex h-9 min-w-[50px] items-center justify-center text-nowrap bg-[#0F2C53] pl-3 pr-1 font-bold text-white'>
|
||||
{prefix}
|
||||
</div>
|
||||
) : (
|
||||
prefix
|
||||
);
|
||||
@@ -124,7 +126,9 @@ export function EnhancedInput({
|
||||
|
||||
const renderSuffix = () => {
|
||||
return typeof suffix === 'string' ? (
|
||||
<div className='bg-muted relative ml-px flex h-9 items-center text-nowrap px-3'>{suffix}</div>
|
||||
<div className='relative ml-px flex h-9 items-center text-nowrap bg-[#0F2C53] px-3 font-bold text-white'>
|
||||
{suffix}
|
||||
</div>
|
||||
) : (
|
||||
suffix
|
||||
);
|
||||
@@ -133,20 +137,22 @@ export function EnhancedInput({
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
'border-input flex w-full items-center overflow-hidden rounded-md border',
|
||||
'border-input flex w-full items-center overflow-hidden rounded-full border bg-[#0F2C53]',
|
||||
className,
|
||||
)}
|
||||
suppressHydrationWarning
|
||||
>
|
||||
{renderPrefix()}
|
||||
<Input
|
||||
step={0.01}
|
||||
{...props}
|
||||
value={value}
|
||||
className='block rounded-none border-none'
|
||||
onChange={handleChange}
|
||||
onBlur={handleBlur}
|
||||
/>
|
||||
<div className={'flex-1 py-[3px]'}>
|
||||
<Input
|
||||
step={0.01}
|
||||
{...props}
|
||||
value={value}
|
||||
className='block h-[44px] rounded-full border-none bg-white shadow-[inset_0_0_7.6px_0_rgba(0,0,0,0.25)]'
|
||||
onChange={handleChange}
|
||||
onBlur={handleBlur}
|
||||
/>
|
||||
</div>
|
||||
{renderSuffix()}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user