-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 💄 add new markets page header * feat: 💄 add new market filter styles * feat: ✨ add new component AssetTableCell added new component AssetTableCell to replace MarketTableCell inside the markets table. * feat: 💄 update oracle price cell style * feat: 💄 change price and interest rate formatting * feat: 💄 add number output styles added number output styles for markets table columns. * feat: ✨ add sparkline chart component * feat: ✨ add daily sparkline inside market data * feat: ✨ add price change chart added price change chart inside markets table. * feat: 💄 add new billboard style * feat: ✨ expose getCandles and add limit * fix: 💄 fix sparkline chart margin * feat: 💄 add new billboard styles and data * fix: 💄 fix sparkline chart overflow * feat: ✨ add numia chain revenue service * feat: ✨ implement getChainRevenue inside billboard * refactor: ♻️ move markets stats inside a specific hook * feat: 💄 add stats section layout * fix: 💄 fix assetCell style * feat: 💄 add stacked variant for AssetTableCell * feat: ✨ add MarketsCompactTable setup * fix: 💄 fix font size inside stacked variant * feat: ✨ add listing and openInterest cells added new cells inside MarketsCompactTable. * feat: ✨ add market listing date added market listing date inside the compact table. * fix: 💄 fix MarketsCompactTable responsive behaviour * feat: ✨ add fiat formatting added fiat formatting for earned by stakers section. * feat: ✨ add sorting prop added sorting prop for MarketsCompactTable * feat: ✨ add gainers/losers sorting added markets stats sorting by gainers/losers. * feat: ✨ add view all button added view all button inside recently listed section. * feat: ✨ add read more link added read more link inside ExchangeBillboards component. * feat: ✨ add learn more link * feat: ✨ add global markets table filter * fix: 💄 fix market compact table overflow * refactor: ♻️ move markets stats inside a specific component * refactor: 🔇 remove sparkline data log * feat: ✨ add highlights toggle * feat: ✨ improve markets losers search * feat: ⬆️ upgrade @dydxprotocol/v4-localization * feat: 💬 add translations * feat: ✨ add formatZeroNumbers utility * test: ✅ add tests for formatZeroNumbers utility * feat: ✨ add compress zeros inside MarketsCompactTable * feat: 💄 improve sub font size * feat: ✨ remove daily sparkline chart removed daily sparkline chart from markets table. * feat: ✨ add currency auto check added currency auto check inside formatZeroNumbers. * feat: ✨ add punctuationSymbol return added punctuationSymbol symbol inside formatZeroNumbers returns. * feat: ✨ add CompressedNumberOutput component * revert: ⏪ revert remove of daily sparkline chart 657ef20 * feat: 💬 add translations for input search * feat: ✨ add MarketFilter compact layout * fix: 🐛 fix AssetTableCell rendering * feat: ✨ remove markets charts removed 24h volume and open interest charts.
- Loading branch information
1 parent
3024d19
commit f4e1a7b
Showing
26 changed files
with
1,444 additions
and
241 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import styled, { AnyStyledComponent } from 'styled-components'; | ||
|
||
import { formatZeroNumbers } from '@/lib/formatZeroNumbers'; | ||
|
||
export type CompressedOutputProps = { | ||
value: string; | ||
compressZeros?: boolean; | ||
className?: string; | ||
}; | ||
|
||
export const CompressedNumberOutput = (props: CompressedOutputProps) => { | ||
const { value, compressZeros, ...otherProps } = props; | ||
const { significantDigits, decimalDigits, zeros, punctuationSymbol } = formatZeroNumbers(value); | ||
|
||
if (compressZeros) { | ||
return ( | ||
<div {...otherProps}> | ||
{significantDigits} | ||
{punctuationSymbol} | ||
{Boolean(zeros) && ( | ||
<> | ||
0<Styled.Sub title={value}>{zeros}</Styled.Sub> | ||
</> | ||
)} | ||
{decimalDigits} | ||
</div> | ||
); | ||
} | ||
|
||
return value; | ||
}; | ||
|
||
const Styled: Record<string, AnyStyledComponent> = {}; | ||
|
||
Styled.Sub = styled.sub` | ||
font-size: 0.85em; | ||
`; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import styled, { type AnyStyledComponent } from 'styled-components'; | ||
|
||
import type { Asset } from '@/constants/abacus'; | ||
|
||
import { breakpoints } from '@/styles'; | ||
|
||
import { AssetIcon } from '@/components/AssetIcon'; | ||
import { TableCell } from '@/components/Table'; | ||
import { Tag } from '@/components/Tag'; | ||
|
||
interface AssetTableCellProps { | ||
asset?: Asset; | ||
className?: string; | ||
stacked?: boolean; | ||
} | ||
|
||
export const AssetTableCell = (props: AssetTableCellProps) => { | ||
const { asset, stacked, className } = props; | ||
|
||
return ( | ||
<TableCell | ||
className={className} | ||
slotLeft={<Styled.AssetIcon stacked={stacked} symbol={asset?.id} />} | ||
> | ||
<Styled.TableCellContent stacked={stacked}> | ||
<Styled.Asset stacked={stacked}>{asset?.name}</Styled.Asset> | ||
{stacked ? <Styled.AssetID>{asset?.id}</Styled.AssetID> : <Tag>{asset?.id}</Tag>} | ||
</Styled.TableCellContent> | ||
</TableCell> | ||
); | ||
}; | ||
|
||
const Styled: Record<string, AnyStyledComponent> = {}; | ||
|
||
Styled.TableCellContent = styled.div<{ stacked?: boolean }>` | ||
gap: ${({ stacked }) => (stacked ? '0.125rem' : '0.75rem')}; | ||
display: flex; | ||
flex-direction: ${({ stacked }) => (stacked ? 'column' : 'row')}; | ||
align-items: ${({ stacked }) => (stacked ? 'flex-start' : 'center')}; | ||
`; | ||
|
||
Styled.AssetIcon = styled(AssetIcon)<{ stacked?: boolean }>` | ||
font-size: ${({ stacked }) => (stacked ? '1.5rem' : '2rem')}; | ||
@media ${breakpoints.tablet} { | ||
font-size: ${({ stacked }) => (stacked ? '1.5rem' : '2.25rem')}; | ||
} | ||
`; | ||
|
||
Styled.AssetID = styled.span` | ||
color: var(--color-text-0); | ||
font: var(--font-mini-medium); | ||
`; | ||
|
||
Styled.Asset = styled.span<{ stacked?: boolean }>` | ||
color: var(--color-text-1); | ||
font: ${({ stacked }) => (stacked ? 'var(--font-small-medium)' : 'var(--font-medium-medium)')}; | ||
`; |
Oops, something went wrong.