Skip to content

Commit

Permalink
Add padding to data tables
Browse files Browse the repository at this point in the history
  • Loading branch information
kattylucy committed Oct 7, 2024
1 parent 7998e86 commit 8a3bbc1
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 12 deletions.
6 changes: 4 additions & 2 deletions centrifuge-app/src/components/Report/AssetList.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Pool } from '@centrifuge/centrifuge-js'
import { Text } from '@centrifuge/fabric'
import { Box, Text } from '@centrifuge/fabric'
import { useContext, useEffect, useMemo } from 'react'
import { useBasePath } from '../../../src/utils/useBasePath'
import { formatDate } from '../../utils/date'
Expand Down Expand Up @@ -308,7 +308,9 @@ export function AssetList({ pool }: { pool: Pool }) {
}

return data.length > 0 ? (
<DataTable data={data} columns={columns} hoverable defaultSortKey="maturity-date" defaultSortOrder="desc" />
<Box padding={2}>
<DataTable data={data} columns={columns} hoverable defaultSortKey="maturity-date" defaultSortOrder="desc" />
</Box>
) : (
<UserFeedback reportType="Assets" />
)
Expand Down
6 changes: 4 additions & 2 deletions centrifuge-app/src/components/Report/AssetTransactions.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Pool } from '@centrifuge/centrifuge-js'
import { formatBalance, useGetExplorerUrl } from '@centrifuge/centrifuge-react'
import { IconAnchor, IconExternalLink, Text } from '@centrifuge/fabric'
import { Box, IconAnchor, IconExternalLink, Text } from '@centrifuge/fabric'
import * as React from 'react'
import { formatDate } from '../../utils/date'
import { getCSVDownloadUrl } from '../../utils/getCSVDownloadUrl'
Expand Down Expand Up @@ -156,7 +156,9 @@ export function AssetTransactions({ pool }: { pool: Pool }) {
}

return data.length > 0 ? (
<DataTable data={data} columns={columns} hoverable />
<Box padding={2}>
<DataTable data={data} columns={columns} hoverable />
</Box>
) : (
<UserFeedback reportType="Asset transactions" />
)
Expand Down
6 changes: 4 additions & 2 deletions centrifuge-app/src/components/Report/FeeTransactions.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Pool } from '@centrifuge/centrifuge-js'
import { Text } from '@centrifuge/fabric'
import { Box, Text } from '@centrifuge/fabric'
import * as React from 'react'
import { formatDate } from '../../utils/date'
import { formatBalance } from '../../utils/formatting'
Expand Down Expand Up @@ -123,7 +123,9 @@ export function FeeTransactions({ pool }: { pool: Pool }) {
}

return data.length > 0 ? (
<DataTable data={data} columns={columns} hoverable />
<Box padding={2}>
<DataTable data={data} columns={columns} hoverable />
</Box>
) : (
<UserFeedback reportType="Fee transactions" />
)
Expand Down
4 changes: 3 additions & 1 deletion centrifuge-app/src/components/Report/InvestorList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ export function InvestorList({ pool }: { pool: Pool }) {
}

return data.length > 0 ? (
<DataTable data={data} columns={columns} hoverable defaultSortKey="value[3]" />
<Box padding={2}>
<DataTable data={data} columns={columns} hoverable defaultSortKey="value[3]" />
</Box>
) : (
<UserFeedback reportType="InvestorList" />
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ export function InvestorTransactions({ pool }: { pool: Pool }) {
}

return data.length > 0 ? (
<DataTable data={data} columns={columns} hoverable />
<Box padding={1}>
<DataTable data={data} columns={columns} hoverable />
</Box>
) : (
<UserFeedback reportType="Investor transactions" />
)
Expand Down
6 changes: 4 additions & 2 deletions centrifuge-app/src/components/Report/OracleTransactions.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Pool } from '@centrifuge/centrifuge-js'
import { Text } from '@centrifuge/fabric'
import { Box, Text } from '@centrifuge/fabric'
import * as React from 'react'
import { formatDate } from '../../utils/date'
import { formatBalance } from '../../utils/formatting'
Expand Down Expand Up @@ -95,7 +95,9 @@ export function OracleTransactions({ pool }: { pool: Pool }) {
}

return data.length > 0 ? (
<DataTable data={data} columns={columns} hoverable />
<Box padding={2}>
<DataTable data={data} columns={columns} hoverable />
</Box>
) : (
<UserFeedback reportType="Oracle transactions" />
)
Expand Down
6 changes: 4 additions & 2 deletions centrifuge-app/src/components/Report/TokenPrice.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Pool } from '@centrifuge/centrifuge-js/dist/modules/pools'
import { Text } from '@centrifuge/fabric'
import { Box, Text } from '@centrifuge/fabric'
import * as React from 'react'
import { formatDate } from '../../utils/date'
import { formatBalance, formatPercentage } from '../../utils/formatting'
Expand Down Expand Up @@ -293,7 +293,9 @@ export function TokenPrice({ pool }: { pool: Pool }) {
}

return poolStates?.length > 0 ? (
<DataTable data={priceRecords} columns={columns} hoverable />
<Box padding={2}>
<DataTable data={priceRecords} columns={columns} hoverable />
</Box>
) : (
<UserFeedback reportType="Token price" />
)
Expand Down

0 comments on commit 8a3bbc1

Please sign in to comment.