Skip to content

Commit 5436c85

Browse files
committed
feat: add base Boost tab
1 parent 58ce79f commit 5436c85

46 files changed

Lines changed: 1184 additions & 419 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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
export interface FieldProps {
2+
children: React.ReactNode;
3+
className?: string;
4+
label?: string;
5+
description?: string | React.ReactElement;
6+
}
7+
8+
export const Field: React.FC<FieldProps> = ({ children, className, label, description }) => (
9+
<div className={className}>
10+
<div className="space-y-1">
11+
{!!label && <p className="text-sm text-grey">{label}</p>}
12+
13+
<div>{children}</div>
14+
</div>
15+
16+
{!!description && <p className="block mt-1 text-grey text-sm">{description}</p>}
17+
</div>
18+
);
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/RiskAcknowledgementToggle/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const RiskAcknowledgementToggle: React.FC<RiskAcknowledgementToggleProps>
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.

apps/evm/src/components/SelectTokenTextField/__testUtils__/testUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { fireEvent, getByTestId } from '@testing-library/react';
22

33
import type { Token } from 'types';
4-
5-
import { getTokenListItemTestId, getTokenSelectButtonTestId } from '../testIdGetters';
4+
import { getTokenListItemTestId } from '../../TokenListWrapper/testIdGetters';
5+
import { getTokenSelectButtonTestId } from '../testIdGetters';
66

77
export const selectToken = ({
88
token,

0 commit comments

Comments
 (0)