mirror of
https://github.com/kremalicious/asi-calculator.git
synced 2024-12-22 17:33:18 +01:00
parent
0c3eecd681
commit
7fb3c95822
@ -1,6 +1,6 @@
|
|||||||
.input {
|
.input {
|
||||||
all: unset;
|
all: unset;
|
||||||
padding: 0 0.75rem;
|
padding: 0 0.5rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-right: 1px solid rgba(var(--foreground-rgb), 0.15);
|
border-right: 1px solid rgba(var(--foreground-rgb), 0.15);
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
.select {
|
.select {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
all: unset;
|
all: unset;
|
||||||
padding: 0 0.75rem;
|
padding: 0 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select:hover:not(.select[disabled]) {
|
.select:hover:not(.select[disabled]) {
|
||||||
|
@ -46,9 +46,7 @@ export function FormAmount({
|
|||||||
pattern="[0-9]*"
|
pattern="[0-9]*"
|
||||||
value={amount}
|
value={amount}
|
||||||
onChange={handleAmountChange}
|
onChange={handleAmountChange}
|
||||||
style={{
|
style={{ width: amount.toString().length + 'ch' }}
|
||||||
width: Math.min(Math.max(amount.toString().length, 2), 50) + 'ch'
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Select
|
<Select
|
||||||
@ -56,7 +54,15 @@ export function FormAmount({
|
|||||||
value={token}
|
value={token}
|
||||||
onChange={handleTokenChange}
|
onChange={handleTokenChange}
|
||||||
disabled={!setToken}
|
disabled={!setToken}
|
||||||
style={setToken ? { paddingRight: '1.25rem' } : {}}
|
style={
|
||||||
|
setToken
|
||||||
|
? {
|
||||||
|
paddingRight: '1.2rem',
|
||||||
|
width: `calc(${token.length + 'em'} - 1.75rem)`,
|
||||||
|
minWidth: '1.85rem'
|
||||||
|
}
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</FormInline>
|
</FormInline>
|
||||||
)
|
)
|
||||||
|
@ -2,6 +2,11 @@ import { Dispatch, SetStateAction } from 'react'
|
|||||||
import { Select, FormInline } from '@/components'
|
import { Select, FormInline } from '@/components'
|
||||||
import { type Market } from '@/features/strategies'
|
import { type Market } from '@/features/strategies'
|
||||||
|
|
||||||
|
const options = [
|
||||||
|
{ value: 'market', label: 'All Markets' },
|
||||||
|
{ value: 'uniswap-v3', label: 'Uniswap v3' }
|
||||||
|
]
|
||||||
|
|
||||||
export function FormMarket({
|
export function FormMarket({
|
||||||
market,
|
market,
|
||||||
setMarket
|
setMarket
|
||||||
@ -9,17 +14,13 @@ export function FormMarket({
|
|||||||
market: Market
|
market: Market
|
||||||
setMarket: Dispatch<SetStateAction<Market>>
|
setMarket: Dispatch<SetStateAction<Market>>
|
||||||
}) {
|
}) {
|
||||||
const options = [
|
|
||||||
{ value: 'market', label: 'All Markets' },
|
|
||||||
{ value: 'uniswap-v3', label: 'Uniswap v3' }
|
|
||||||
]
|
|
||||||
return (
|
return (
|
||||||
<FormInline>
|
<FormInline>
|
||||||
<Select
|
<Select
|
||||||
options={options}
|
options={options}
|
||||||
value={market}
|
value={market}
|
||||||
onChange={(e) => setMarket(e.target.value as Market)}
|
onChange={(e) => setMarket(e.target.value as Market)}
|
||||||
style={{ paddingRight: '1.25rem' }}
|
style={{ paddingRight: '1.2rem' }}
|
||||||
/>
|
/>
|
||||||
</FormInline>
|
</FormInline>
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user