Skip to content

Commit

Permalink
Merge pull request #256 from pendulum-chain/224-grey-out-the-output-f…
Browse files Browse the repository at this point in the history
…ield

implement styles for readonly input
  • Loading branch information
Sharqiewicz authored Nov 7, 2024
2 parents 6268537 + a2e0ffb commit 62b3bf2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/AssetNumericInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,20 @@ export const AssetNumericInput: FC<AssetNumericInputProps> = ({
}) => (
<div
className={
'flex pl-2 focus:outline-none input-ghost text-accent-content input-bordered input ' +
(rest.disabled ? 'opacity-50 input-disabled' : '')
'flex pl-2 focus:outline-none input-ghost text-accent-content' +
(rest.disabled ? ' opacity-50 input-disabled' : '') +
(rest.readOnly ? ' pr-4' : ' input-bordered input')
}
>
<div className="flex items-center justify-between">
<AssetButton assetIcon={assetIcon} tokenSymbol={tokenSymbol} onClick={onClick} />
</div>

<NumericInput register={registerInput} additionalStyle="text-right text-lg w-full" disableStyles={true} {...rest} />
<NumericInput
register={registerInput}
additionalStyle={'text-right text-lg w-full' + (rest.readOnly ? ' text-xl' : '')}
disableStyles={true}
{...rest}
/>
</div>
);

0 comments on commit 62b3bf2

Please sign in to comment.