-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #695 from madfish-solutions/add-new-pool-creation-…
…card [StableSwap] Add create new pool component
- Loading branch information
Showing
14 changed files
with
192 additions
and
12 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
src/modules/stableswap/stableswap-liquidity/pages/list/components/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './pool-card'; | ||
export * from './list-filter'; | ||
export * from './stableswap-liquidity-general-stats'; |
1 change: 1 addition & 0 deletions
1
src/modules/stableswap/stableswap-liquidity/pages/list/components/pool-creation/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './pool-creation'; |
56 changes: 56 additions & 0 deletions
56
...leswap/stableswap-liquidity/pages/list/components/pool-creation/pool-creation.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
@import '@styles/variables'; | ||
@import '@styles/breakpoints'; | ||
|
||
.createPool { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
padding: 24px; | ||
} | ||
|
||
.poolCreateDescription { | ||
font-weight: 600; | ||
font-size: 14px; | ||
line-height: 24px; | ||
white-space: nowrap; | ||
margin-bottom: 16px; | ||
} | ||
|
||
.button { | ||
max-width: 280px; | ||
} | ||
|
||
.light { | ||
&.poolCreateDescription { | ||
color: $text-01; | ||
} | ||
} | ||
|
||
.dark { | ||
&.poolCreateDescription { | ||
color: $text-inverse; | ||
} | ||
} | ||
|
||
@include media('>tablet') { | ||
.createPool { | ||
flex-direction: column; | ||
height: 128px; | ||
} | ||
|
||
.button { | ||
max-width: 160px; | ||
margin-left: 24px; | ||
} | ||
} | ||
|
||
@include media('>Ltablet') { | ||
.createPool { | ||
flex-direction: row; | ||
} | ||
|
||
.poolCreateDescription { | ||
margin-bottom: 0; | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...les/stableswap/stableswap-liquidity/pages/list/components/pool-creation/pool-creation.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { FC, useContext } from 'react'; | ||
|
||
import cx from 'classnames'; | ||
|
||
import { AppRootRoutes } from '@app.router'; | ||
import { StableswapRoutes, Tabs } from '@modules/stableswap/stableswap.page'; | ||
import { ColorThemeContext, ColorModes } from '@providers/color-theme-context'; | ||
import { Button } from '@shared/components'; | ||
import { useTranslation } from '@translation'; | ||
|
||
import styles from './pool-creation.module.scss'; | ||
|
||
const modeClass = { | ||
[ColorModes.Light]: styles.light, | ||
[ColorModes.Dark]: styles.dark | ||
}; | ||
|
||
export const PoolCreation: FC = () => { | ||
const { colorThemeMode } = useContext(ColorThemeContext); | ||
const { t } = useTranslation('stableswap'); | ||
|
||
return ( | ||
<div className={cx(styles.createPool, modeClass[colorThemeMode])}> | ||
<div className={cx(styles.poolCreateDescription, modeClass[colorThemeMode])}>{t('stableswap|createOwnPool')}</div> | ||
<Button className={styles.button} href={`${AppRootRoutes.Stableswap}${StableswapRoutes.liquidity}${Tabs.add}`}> | ||
{t('stableswap|createPool')} | ||
</Button> | ||
</div> | ||
); | ||
}; |
1 change: 1 addition & 0 deletions
1
...ap/stableswap-liquidity/pages/list/components/stableswap-liquidity-general-stats/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './stableswap-liquidity-general-stats'; |
19 changes: 19 additions & 0 deletions
19
...ponents/stableswap-liquidity-general-stats/stableswap-liquidity-general-stats.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@import '@styles/variables'; | ||
@import '@styles/breakpoints'; | ||
|
||
.dashboardStatsInfoMB { | ||
margin-bottom: 64px; | ||
} | ||
|
||
.cardContent { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
padding: 0; | ||
} | ||
|
||
@include media('>tablet') { | ||
.cardContent { | ||
flex-direction: row; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...list/components/stableswap-liquidity-general-stats/stableswap-liquidity-general-stats.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { FC } from 'react'; | ||
|
||
import { DashboardStatsInfo } from '@shared/components'; | ||
|
||
import { PoolCreation } from '../pool-creation'; | ||
import { Tvl } from '../tvl'; | ||
import styles from './stableswap-liquidity-general-stats.module.scss'; | ||
|
||
export const StableswapLiquidityGeneralStats: FC = () => ( | ||
<DashboardStatsInfo | ||
cards={[<Tvl />, <PoolCreation />]} | ||
contentClassName={styles.cardContent} | ||
className={styles.dashboardStatsInfoMB} | ||
/> | ||
); |
1 change: 1 addition & 0 deletions
1
src/modules/stableswap/stableswap-liquidity/pages/list/components/tvl/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './tvl'; |
31 changes: 31 additions & 0 deletions
31
src/modules/stableswap/stableswap-liquidity/pages/list/components/tvl/tvl.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@import '@styles/variables'; | ||
@import '@styles/breakpoints'; | ||
|
||
.tvl { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
padding: 24px; | ||
} | ||
|
||
.tvlTitle { | ||
color: $text-03; | ||
font-weight: 600; | ||
font-size: 16px; | ||
line-height: 24px; | ||
margin-bottom: 8px; | ||
} | ||
|
||
.amount { | ||
font-weight: 600; | ||
font-size: 18px; | ||
line-height: 24px; | ||
} | ||
|
||
@include media('>tablet') { | ||
.amount { | ||
font-size: 32px; | ||
line-height: 48px; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/modules/stableswap/stableswap-liquidity/pages/list/components/tvl/tvl.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { FC } from 'react'; | ||
|
||
import { StateCurrencyAmount } from '@shared/components'; | ||
import { useTranslation } from '@translation'; | ||
|
||
import styles from './tvl.module.scss'; | ||
|
||
export const Tvl: FC = () => { | ||
const { t } = useTranslation('stableswap'); | ||
|
||
return ( | ||
<div className={styles.tvl}> | ||
<div className={styles.tvlTitle}>{t('stableswap|tvl')}</div> | ||
<StateCurrencyAmount amount={10000} currency="$" isLeftCurrency className={styles.amount} /> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters