Skip to content

Commit abd6dc7

Browse files
committed
feat: add Boost tab UI
1 parent 14e3aa0 commit abd6dc7

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

  • apps/evm/src/pages/Market/OperationForm/BoostForm/TokenSelectField
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { type ButtonProps, Icon, QuinaryButton, TokenIconWithSymbol, cn } from 'components';
2+
import type { Token } from 'types';
3+
4+
export interface TokenSelectFieldProps {
5+
onButtonClick: ButtonProps['onClick'];
6+
token: Token;
7+
isActive: boolean;
8+
label: string;
9+
disabled?: boolean;
10+
className?: string;
11+
}
12+
13+
export const TokenSelectField: React.FC<TokenSelectFieldProps> = ({
14+
token,
15+
onButtonClick,
16+
isActive,
17+
disabled,
18+
label,
19+
className,
20+
}) => (
21+
<div className={className}>
22+
<p className="text-sm font-semibold text-grey">{label}</p>
23+
24+
<QuinaryButton
25+
className={cn(
26+
'px-4 h-14 w-full rounded-xl active:bg-lightGrey active:border-blue disabled:bg-transparent disabled:border-lightGrey',
27+
isActive && 'border-blue bg-lightGrey',
28+
)}
29+
contentClassName="w-full justify-between disabled:bg-transparent"
30+
onClick={onButtonClick}
31+
disabled={disabled}
32+
>
33+
<div className="flex items-center gap-x-2">
34+
<TokenIconWithSymbol token={token} tokenIconClassName="h-5 w-5" />
35+
</div>
36+
37+
<Icon
38+
name="arrowUp"
39+
className={cn(
40+
'w-5 h-5',
41+
!isActive && 'rotate-180',
42+
disabled ? 'text-grey' : 'text-offWhite',
43+
)}
44+
/>
45+
</QuinaryButton>
46+
</div>
47+
);

0 commit comments

Comments
 (0)