Skip to content

Commit fac6fe6

Browse files
W3stsidealfetopito
andauthored
wrapped Trades in PageWrapper (gnosis#1246)
Co-authored-by: Leandro Boscariol <[email protected]>
1 parent b55f224 commit fac6fe6

File tree

3 files changed

+39
-6
lines changed

3 files changed

+39
-6
lines changed

src/components/DepositWidget/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ interface WithdrawState {
3737
tokenAddress: string
3838
}
3939

40-
const BalancesWidget = styled(CardWidgetWrapper)`
40+
export const BalancesWidget = styled(CardWidgetWrapper)`
4141
background: var(--color-background-pageWrapper);
4242
height: 100%;
4343

src/components/TradesWidget/index.tsx

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ import styled from 'styled-components'
77
import { formatPrice, formatAmount, invertPrice, formatAmountFull } from '@gnosis.pm/dex-js'
88

99
import FilterTools from 'components/FilterTools'
10-
import { CardTable, CardWidgetWrapper } from 'components/Layout/Card'
10+
import { CardTable } from 'components/Layout/Card'
1111
import { ConnectWalletBanner } from 'components/ConnectWalletBanner'
1212
import { FileDownloaderLink } from 'components/FileDownloaderLink'
1313
import { StandaloneCardWrapper } from 'components/Layout/PageWrapper'
1414
import { TradeRow } from 'components/TradesWidget/TradeRow'
15+
import { BalancesWidget } from 'components/DepositWidget'
1516

1617
import { useWalletConnection } from 'hooks/useWalletConnection'
1718
import { useTrades } from 'hooks/useTrades'
@@ -21,10 +22,32 @@ import { Trade } from 'api/exchange/ExchangeApi'
2122

2223
import { toCsv, CsvColumns } from 'utils/csv'
2324
import { filterTradesFn } from 'utils/filter'
24-
2525
import { getNetworkFromId, divideBN } from 'utils'
2626
import { symbolOrAddress } from 'utils/display'
2727

28+
const OverflowContainer = styled(BalancesWidget)`
29+
> ${CardTable} {
30+
> thead > tr:not(.cardRowDrawer) {
31+
padding: 0.8rem 2rem 0.8rem 1.6rem;
32+
}
33+
34+
> thead,
35+
> tbody {
36+
font-size: 1.3rem;
37+
38+
> tr:not(.cardRowDrawer) {
39+
min-height: 4rem;
40+
text-align: left;
41+
> td,
42+
> th {
43+
justify-content: flex-start;
44+
text-align: left;
45+
}
46+
}
47+
}
48+
}
49+
`
50+
2851
const CsvButtonContainer = styled.div`
2952
display: flex;
3053
justify-content: space-between;
@@ -205,7 +228,7 @@ export const TradesWidget: React.FC = () => {
205228
<ConnectWalletBanner />
206229
) : (
207230
<StandaloneCardWrapper>
208-
<CardWidgetWrapper>
231+
<OverflowContainer>
209232
<FilterTools
210233
className="widgetFilterTools"
211234
resultName="trades"
@@ -215,7 +238,7 @@ export const TradesWidget: React.FC = () => {
215238
dataLength={filteredData.length}
216239
/>
217240
<InnerTradesWidget trades={filteredData} />
218-
</CardWidgetWrapper>
241+
</OverflowContainer>
219242
</StandaloneCardWrapper>
220243
)
221244
}

src/pages/Trades.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
export { default } from 'components/TradesWidget'
1+
import React from 'react'
2+
import TradesPage from 'components/TradesWidget'
3+
import { PageWrapper } from 'components/Layout/PageWrapper'
4+
5+
const Trades: React.FC = () => (
6+
<PageWrapper>
7+
<TradesPage />
8+
</PageWrapper>
9+
)
10+
11+
export default Trades

0 commit comments

Comments
 (0)