Skip to content

Commit f2f3116

Browse files
committed
feat: add Boost tab UI
1 parent 1587a81 commit f2f3116

51 files changed

Lines changed: 1180 additions & 428 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/twenty-sites-smile.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@venusprotocol/evm": minor
3+
---
4+
5+
add base Boost tab

apps/evm/src/components/Accordion/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const Accordion: React.FC<AccordionProps> = ({
2626
>
2727
{!!title && <span className="text-grey">{title}</span>}
2828

29-
<div className="ml-auto justify-self-end flex items-center gap-x-1">
29+
<div className="ml-auto justify-self-end flex items-center gap-x-1 text-sm">
3030
{!!rightLabel && <span>{rightLabel}</span>}
3131

3232
<Icon name="arrowUp" className={cn('text-grey w-5 h-5', !isOpen && 'rotate-180')} />
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import type { SVGProps } from 'react';
2+
3+
const SvgArrowRightFull = (props: SVGProps<SVGSVGElement>) => (
4+
<svg
5+
width="24"
6+
height="24"
7+
viewBox="0 0 24 24"
8+
fill="none"
9+
xmlns="http://www.w3.org/2000/svg"
10+
{...props}
11+
>
12+
<path
13+
d="M5 12.3334L18.3332 12.3334"
14+
stroke="#AAB3CA"
15+
stroke-width="2"
16+
stroke-linecap="round"
17+
stroke-linejoin="round"
18+
/>
19+
<path
20+
d="M14.3333 8.99996L18.3333 12.3138L14.3333 15.6666"
21+
stroke="#AAB3CA"
22+
stroke-width="2"
23+
stroke-linecap="round"
24+
stroke-linejoin="round"
25+
/>
26+
</svg>
27+
);
28+
29+
export default SvgArrowRightFull;

apps/evm/src/components/Icon/icons/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,4 @@ export { default as transactionCollateral } from './transactionCollateral';
7373
export { default as transactionLink } from './transactionLink';
7474
export { default as eMode } from './eMode';
7575
export { default as gear } from './gear';
76+
export { default as arrowRightFull } from './arrowRightFull';

apps/evm/src/components/LabeledInlineContent/index.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const LabeledInlineContent = ({
2828
className={cn('flex w-full items-center justify-between space-x-4', className)}
2929
{...otherContainerProps}
3030
>
31-
<div className="flex items-center text-sm md:text-base">
31+
<div className="flex items-center text-sm">
3232
{typeof iconSrc === 'string' && (
3333
<Icon name={iconSrc} className={cn('-mt-[2px] mr-2 h-5 w-5', iconClassName)} />
3434
)}
@@ -37,18 +37,13 @@ export const LabeledInlineContent = ({
3737
<TokenIcon token={iconSrc} className="-mt-[2px] mr-2 h-5 w-5" />
3838
)}
3939

40-
<p className={cn('text-sm md:text-base', invertTextColors ? 'text-offWhite' : 'text-grey')}>
41-
{label}
42-
</p>
40+
<p className={cn('text-sm', invertTextColors ? 'text-offWhite' : 'text-grey')}>{label}</p>
4341

4442
{!!tooltip && <InfoIcon className="ml-2 inline-flex items-center" tooltip={tooltip} />}
4543
</div>
4644

4745
<div
48-
className={cn(
49-
'flex items-center text-sm md:text-base',
50-
invertTextColors ? 'text-grey' : 'text-offWhite',
51-
)}
46+
className={cn('flex items-center text-sm', invertTextColors ? 'text-grey' : 'text-offWhite')}
5247
>
5348
{children}
5449
</div>

apps/evm/src/components/Notice/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const Notice = ({
2121
description,
2222
variant = 'info',
2323
onClose,
24+
size = 'md',
2425
...otherProps
2526
}: NoticeProps) => (
2627
<div
@@ -36,7 +37,8 @@ export const Notice = ({
3637
>
3738
<div
3839
className={cn(
39-
'flex transition-colors ease-linear px-3 py-2 md:px-4 md:py-3',
40+
'flex transition-colors ease-linear px-3 py-2',
41+
size === 'md' && 'md:px-4 md:py-3',
4042
variant === 'info' && 'bg-blue/5',
4143
variant === 'error' && 'bg-red/5',
4244
variant === 'success' && 'bg-green/5',
@@ -50,7 +52,8 @@ export const Notice = ({
5052
) : (
5153
<Icon
5254
className={cn(
53-
'h-4 w-4 md:h-5 md:w-5',
55+
'h-4 w-4',
56+
size === 'md' && 'md:h-5 md:w-5',
5457
variant === 'info' && 'text-blue',
5558
variant === 'error' && 'text-red',
5659
variant === 'success' && 'text-green',
@@ -64,7 +67,9 @@ export const Notice = ({
6467
<div className="grow overflow-hidden break-words space-y-2">
6568
{title && <p className="text-sm font-semibold">{title}</p>}
6669

67-
{!!description && <p className="text-xs md:text-sm">{description}</p>}
70+
{!!description && (
71+
<p className={cn('text-xs', size === 'md' && 'md:text-sm')}>{description}</p>
72+
)}
6873
</div>
6974
</div>
7075

apps/evm/src/components/Notice/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ export interface NoticeProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
66
description?: string | ReactElement;
77
title?: string | ReactElement;
88
variant?: NoticeVariant;
9+
size?: 'sm' | 'md';
910
onClose?: () => void;
1011
}

apps/evm/src/components/RiskAcknowledgementToggle/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ export const RiskAcknowledgementToggle: React.FC<RiskAcknowledgementToggleProps>
1212

1313
return (
1414
<div className={cn('space-y-3', className)}>
15-
<NoticeError description={t('operationForm.riskyOperation.warning')} />
15+
<NoticeError description={t('operationForm.riskyOperation.warning')} size="sm" />
1616

1717
<div className="flex gap-x-3">
1818
<Toggle {...toggleProps} />
1919

20-
<p>{t('operationForm.riskyOperation.toggleLabel')}</p>
20+
<p className="text-sm">{t('operationForm.riskyOperation.toggleLabel')}</p>
2121
</div>
2222
</div>
2323
);

apps/evm/src/components/SelectTokenTextField/TokenList/index.tsx

Lines changed: 0 additions & 154 deletions
This file was deleted.

apps/evm/src/components/SelectTokenTextField/TokenList/styles.ts

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)