diff --git a/src/assets/scss/components/_components.scss b/src/assets/scss/components/_components.scss index b8c464f60..2f3349383 100644 --- a/src/assets/scss/components/_components.scss +++ b/src/assets/scss/components/_components.scss @@ -15,10 +15,10 @@ @import '../../../components/Marquee/marquee.styles.scss'; @import '../../../components/MultilayerPercentage/multilayerPercentage.styles.scss'; @import '../../../components/NftPreview/nftPreview.styles.scss'; -@import '../../../components/NodesTable/nodesTable.styles.scss'; @import '../../../components/Nodes/AuctionListTable/auctionListTables.styles.scss'; @import '../../../components/Nodes/NodesOverview/nodesOverview.styles.scss'; @import '../../../components/Nodes/NodesStatusPreviewCards/nodesStatusPreviewCards.styles.scss'; +@import '../../../components/NodesTable/nodesTable.styles.scss'; @import '../../../components/NotificationsBar/notificationsBar.styles.scss'; @import '../../../components/Pager/pager.styles.scss'; @import '../../../components/PageState/components/IconState/iconState.styles.scss'; diff --git a/src/assets/scss/components/_pages.scss b/src/assets/scss/components/_pages.scss index f71135710..fe766c89f 100644 --- a/src/assets/scss/components/_pages.scss +++ b/src/assets/scss/components/_pages.scss @@ -2,7 +2,9 @@ @import '../../../pages/AccountDetails/AccountTokensTable/accountTokensTable.styles.scss'; @import '../../../pages/Analytics/analytics.styles.scss'; @import '../../../pages/BlockDetails/blockDetails.styles.scss'; +@import '../../../pages/Home/home.styles.scss'; @import '../../../pages/Identities/identities.styles.scss'; +@import '../../../pages/NativeToken/nativeToken.styles.scss'; @import '../../../pages/NftDetails/nftDetails.styles.scss'; @import '../../../pages/NodeDetails/components/NetworkMetrics/networkMetrics.styles.scss'; @import '../../../pages/NodeDetails/components/Rounds/rounds.styles.scss'; diff --git a/src/assets/scss/components/_widgets.scss b/src/assets/scss/components/_widgets.scss index c1855ed0f..e05afff04 100644 --- a/src/assets/scss/components/_widgets.scss +++ b/src/assets/scss/components/_widgets.scss @@ -1,9 +1,9 @@ +@import '../../../widgets/ChartCard/chartCard.styles.scss'; +@import '../../../widgets/ChartContractsTransactions/chartContractsTransactions.styles.scss'; +@import '../../../widgets/EconomicsCard/economicsCard.styles.scss'; @import '../../../widgets/HeroHome/heroHome.styles.scss'; @import '../../../widgets/HeroNodes/heroNodes.styles.scss'; @import '../../../widgets/HeroPills/heroPills.styles.scss'; @import '../../../widgets/MostUsed/mostUsed.styles.scss'; -@import '../../../widgets/ValidatorsStatusCard/validatorsStatusCard.styles.scss'; @import '../../../widgets/StatsCard/statsCard.styles.scss'; - -// temp -@import '../../../pages/Home/components/ChartContractsTransactions/chartContractsTransactions.styles.scss'; +@import '../../../widgets/ValidatorsStatusCard/validatorsStatusCard.styles.scss'; diff --git a/src/assets/scss/elements/_tabs.scss b/src/assets/scss/elements/_tabs.scss index 84ff2c8f6..3e32ffd0d 100644 --- a/src/assets/scss/elements/_tabs.scss +++ b/src/assets/scss/elements/_tabs.scss @@ -19,7 +19,7 @@ border-radius: 0.5rem; background-color: transparent; - @media (min-width: 768px) { + @include media-breakpoint-up(md) { font-size: 1rem; padding: 0.75rem 1rem; } @@ -45,7 +45,7 @@ &.active { color: var(--primary); } - @media (min-width: 768px) { + @include media-breakpoint-up(md) { font-size: 1.5rem; padding: 0.5rem 0.75rem; } diff --git a/src/assets/scss/plugins/_sdk-dapp-overrides.scss b/src/assets/scss/plugins/_sdk-dapp-overrides.scss index 77feaf32c..40b65ae99 100644 --- a/src/assets/scss/plugins/_sdk-dapp-overrides.scss +++ b/src/assets/scss/plugins/_sdk-dapp-overrides.scss @@ -547,7 +547,7 @@ a .dapp-core-component__trim-styles__ellipsis { } } -@media (min-width: 768px) { +@include media-breakpoint-up(md) { .dapp-core-component__signWithDeviceModalStyles__modal-layout-content.dapp-core-component__signWithDeviceModalStyles__spaced { padding: 2rem 0.75rem 1.5rem 0.75rem !important; } diff --git a/src/components/AccountsTable/AccountsTable.tsx b/src/components/AccountsTable/AccountsTable.tsx new file mode 100644 index 000000000..3bd432321 --- /dev/null +++ b/src/components/AccountsTable/AccountsTable.tsx @@ -0,0 +1,170 @@ +import BigNumber from 'bignumber.js'; +import classNames from 'classnames'; + +import { + FormatAmount, + AccountLink, + FormatNumber, + FormatUSD, + PercentageBar, + Pager, + PageSize, + Loader, + PageState +} from 'components'; +import { DECIMALS } from 'config'; +import { formatBigNumber, parseAmount } from 'helpers'; +import { faUser } from 'icons/regular'; +import { AccountType, TokenLockedAccountType, WithClassnameType } from 'types'; + +export interface AccountsTableUIType extends WithClassnameType { + accounts: AccountType[] | TokenLockedAccountType[]; + accountsCount: number; + title?: React.ReactNode; + message?: string; + decimals?: number; + showValue?: boolean; + supply?: string | number; + price?: number; + isDataReady?: boolean; + hasNameColumn?: boolean; + isNativeToken?: boolean; +} + +export const AccountsTable = ({ + accounts, + accountsCount, + title, + message = 'Accounts', + decimals = DECIMALS, + showValue, + price, + supply, + isNativeToken = false, + isDataReady, + hasNameColumn +}: AccountsTableUIType) => { + const hasSupply = new BigNumber(supply ?? 0).isGreaterThan(0); + const showAccounts = isDataReady === true && accounts.length > 0; + + return ( +
Address | + {hasNameColumn &&Name | } +Balance | + {hasSupply && ( +Percentage | + )} + {showValue &&Value | } +
---|---|---|---|---|
+
+
+ |
+ {hasAccountName && (
+ {(account as TokenLockedAccountType).name} | + )} +
+ |
+ {hasSupply && (
+
+
+
+ |
+ )}
+ {showValue && (
+
+ |
+ )}
+
- Address - | -Balance | - {hasSupply && ( -Percentage | - )} - {showValue &&Value | } -
---|---|---|---|
-
-
- |
-
- |
- {hasSupply && (
-
-
-
- |
- )}
- {showValue && (
-
- |
- )}
-
Address | -Name | -Balance | - {hasSupply && ( -Percentage | - )} - {showValue &&Value | } -
---|---|---|---|---|
- |
- {lockedAccount.name} | -
- |
- {hasSupply && (
-
-
-
- |
- )}
- {showValue && (
-
- |
- )}
-