diff --git a/src/components/homePage/AccountInfo.tsx b/src/components/homePage/AccountInfo.tsx index 25befc51..eb73ad9a 100644 --- a/src/components/homePage/AccountInfo.tsx +++ b/src/components/homePage/AccountInfo.tsx @@ -3,17 +3,14 @@ import { MutedDiv } from '../utils/MutedText' import Section from '../utils/Section' import { CopyAddress } from './address-views/utils' import { LARGE_AVATAR_SIZE } from '../utils/Size.config' -import { toShortAddress, convertAddressToChainFormat } from '../utils/index' +import { toShortAddress } from '../utils/index' import { DfMd } from '../utils/DfMd' import { useMyExtensionAddresses } from '../providers/MyExtensionAccountsContext' import { useResponsiveSize } from '../responsive' import BaseAvatar from '../utils/DfAvatar' import styles from './address-views/utils/index.module.sass' -import { LinkWithIcon } from '../table/utils' -import { resolveStatescanUrl } from '../table/links' import { AddressQrModal } from '../qrs/QrModal' import clsx from 'clsx' -import { useChainInfo } from '../../rtk/features/multiChainInfo/multiChainInfoHooks' import { allAccountsAvatar } from './address-views/utils/index' import { toGenericAccountId } from 'src/rtk/app/util' import { @@ -60,7 +57,6 @@ export const AccountInfo = (props: Props) => { const { t } = useTranslation() const accounts = useMyExtensionAddresses() - const chains = useChainInfo() let { image: accountAvatar, about: accountDescription } = owner || {} @@ -84,11 +80,6 @@ export const AccountInfo = (props: Props) => { const genericAccountId = toGenericAccountId(address?.toString()) - const ksmAddress = convertAddressToChainFormat( - address?.toString(), - chains?.kusama?.ss58Format - ) - const addressView = (
{
{address && ( )} - - {ksmAddress && ( - - )}
) diff --git a/src/components/homePage/HomePageLayout.tsx b/src/components/homePage/HomePageLayout.tsx index da707bae..57d2c87a 100644 --- a/src/components/homePage/HomePageLayout.tsx +++ b/src/components/homePage/HomePageLayout.tsx @@ -2,7 +2,7 @@ import NtfLayout from '../ntf/NftsLayout' import { Tabs } from 'antd' import { useEffect, useMemo, useState } from 'react' import styles from './Index.module.sass' -import BalancesTableNew from '../table/balancesTable' +import BalancesTable from '../table/balancesTable' import { useSendEvent } from '../providers/AnalyticContext' import { useRouter } from 'next/router' import TxHistoryLayout from '../txHistory' @@ -44,7 +44,7 @@ const HomePageLayout = ({ addresses }: OverviewSectionProps) => { { key: 'portfolio', tab: 'Portfolio', - children: , + children: , }, { key: 'nfts', diff --git a/src/components/homePage/address-views/utils/index.tsx b/src/components/homePage/address-views/utils/index.tsx index 7abe8e22..52fc648b 100644 --- a/src/components/homePage/address-views/utils/index.tsx +++ b/src/components/homePage/address-views/utils/index.tsx @@ -30,6 +30,7 @@ type BalanceViewProps = { defaultPostfix?: string style?: CSSProperties className?: string + decimalClassName?: string } export const BalanceView = ({ @@ -42,6 +43,7 @@ export const BalanceView = ({ defaultPostfix = '00', className, style, + decimalClassName }: BalanceViewProps) => { if (!value) return <>- @@ -77,7 +79,7 @@ export const BalanceView = ({ {postfixValue && ( <> . - + {isPrefixInString ? postfixValue.slice(0, -1) : postfixValue} @@ -112,7 +114,7 @@ export const CopyAddress = ({ return ( {children} - + diff --git a/src/components/qrs/QrModal.tsx b/src/components/qrs/QrModal.tsx index 5bce891f..ba687256 100644 --- a/src/components/qrs/QrModal.tsx +++ b/src/components/qrs/QrModal.tsx @@ -94,7 +94,7 @@ export const AddressQrModal = ({ className, modalClassName, ...props }: Omit ( - + ) diff --git a/src/components/table/Table.module.sass b/src/components/table/Table.module.sass index 42a67597..72b265b2 100644 --- a/src/components/table/Table.module.sass +++ b/src/components/table/Table.module.sass @@ -27,6 +27,20 @@ $zero_margin: 0 .DfCol width: 100% +.RowTitle + font-size: $font_normal + +.RowTitleBold + font-weight: 600 + +@media ( max-width: $max_mobile_width ) + .RowTitle + font-size: 15px + +.RowValue + display: flex + flex-direction: column + .Card min-height: 5rem border-radius: $border_radius_normal @@ -322,6 +336,7 @@ $zero_margin: 0 border-bottom: 1px solid #f0f0f0 .NonTokenImage - width: 24px + max-width: 24px + width: 100% height: 24px font-size: $font_small diff --git a/src/components/table/balancesTable/index.tsx b/src/components/table/balancesTable/index.tsx index a0004df8..7a180d86 100644 --- a/src/components/table/balancesTable/index.tsx +++ b/src/components/table/balancesTable/index.tsx @@ -2,7 +2,6 @@ import clsx from 'clsx' import styles from '../Table.module.sass' import { BALANCE_SHOW_ZERO_BALANCES, - BALANCE_TABLE_VARIANT, BALANCE_TABLE_VIEW, BalancePart, } from '../utils' @@ -13,11 +12,8 @@ import { } from '../customTable/TableContext' import { useTranslation } from 'react-i18next' import { useIsMyConnectedAddress } from 'src/components/providers/MyExtensionAccountsContext' -import { useState } from 'react' -import { BalanceVariant } from './types' -import store from 'store' import { useGetTableData } from './utils/useGetTableData' -import ActionPannel from './utils/ActionPannel' +import ActionPanel from './utils/ActionPanel' import TransferModal from 'src/components/transfer/TransferModal' import PricesWarning from './PricesWarning' @@ -30,24 +26,26 @@ type BalancesTableInnerProps = BalancesTableProps & { storeTableView: string } -const BalancesTableNewInner = (props: BalancesTableInnerProps) => { +const BalancesTableInner = (props: BalancesTableInnerProps) => { const { storeShowZeroBalance, storeTableView, addresses } = props const isMyAddress = useIsMyConnectedAddress(addresses?.[0]) - const tableVariantFromStore = store.get(BALANCE_TABLE_VARIANT) - const { tableView, showZeroBalances } = useTableContext() - const [ balancesVariant, setBalancesVariant ] = useState( - tableVariantFromStore || 'chains' - ) + const { tableView, showZeroBalances, balancesVariant, setBalancesVariant } = + useTableContext() - const { loading, balancesLoading, data, transferModalState, transferModalDispatch } = - useGetTableData(addresses, balancesVariant) + const { + loading, + balancesLoading, + data, + transferModalState, + transferModalDispatch, + } = useGetTableData(addresses, balancesVariant) const { t } = useTranslation() return (
- { ) } -const BalancesTableNew = (props: BalancesTableProps) => { +const BalancesTable = (props: BalancesTableProps) => { const storeProps = { storeShowZeroBalance: BALANCE_SHOW_ZERO_BALANCES, storeTableView: BALANCE_TABLE_VIEW, @@ -88,9 +86,9 @@ const BalancesTableNew = (props: BalancesTableProps) => { - + ) } -export default BalancesTableNew +export default BalancesTable diff --git a/src/components/table/balancesTable/parseData/parseBalanceInfo.tsx b/src/components/table/balancesTable/parseData/parseBalanceInfo.tsx index 0a591912..d32b885c 100644 --- a/src/components/table/balancesTable/parseData/parseBalanceInfo.tsx +++ b/src/components/table/balancesTable/parseData/parseBalanceInfo.tsx @@ -7,7 +7,7 @@ import { pluralize, toShortMoney, } from '@subsocial/utils' -import { MutedSpan, MutedDiv } from '../../../utils/MutedText' +import { MutedSpan } from '../../../utils/MutedText' import { ChainData, getBalanceWithDecimals, @@ -17,7 +17,6 @@ import { getBalances, AccountPreview, getParentBalances, - resolveAccountDataImage, } from '../../utils' import styles from '../../Table.module.sass' import { BalancesTableInfo } from '../../types' @@ -32,36 +31,38 @@ import { convertAddressToChainFormat, SubIcon } from '../../../utils/index' import { AccountIdentitiesRecord } from '../../../../rtk/features/identities/identitiesSlice' import { AccountInfoByChain } from '../../../identity/types' import { getSubsocialIdentityByAccount } from '../../../../rtk/features/identities/identitiesHooks' -import BaseAvatar from '../../../utils/DfAvatar' import { BalanceView } from '../../../homePage/address-views/utils/index' import { TFunction } from 'i18next' -import { Button } from 'antd' +import { Button, Tooltip } from 'antd' import { FiSend } from 'react-icons/fi' import { LinksButton } from '../../links/Links' +import { PnlInDollars, PriceChangedOn } from '../utils' +import { InfoCircleOutlined } from '@ant-design/icons' const getAccountData = (info: AccountInfoByChain, t: TFunction) => { const { reservedBalance, freeBalance, lockedBalance } = info return [ - // { - // key: 'frozen', - // label: t('table.balances.frozen'), - // value: frozenBalance?.toString() || '0', - // }, { key: 'locked', label: t('table.balances.locked'), value: lockedBalance?.toString() || '0', + tooltipText: + 'Tokens that are locked, and cannot be transferred to another account. One token can be locked by multiple things at the same time, such as governance and staking.', }, { key: 'reserved', label: t('table.balances.reserved'), value: reservedBalance?.toString() || '0', + tooltipText: + 'Tokens that are reserved by one specific thing, such as setting an on-chain identity, and cannot be transferred to another account.', }, { key: 'free', label: t('table.balances.free'), value: freeBalance, + tooltipText: + 'Tokens that are not reserved or locked, and can be transferred to another account.', }, ] } @@ -274,10 +275,11 @@ export const parseBalancesTableInfo = ({ totalTokensValue = totalTokensValue.plus(totalValue) return { - key: symbol, - chain: <>, + key: `detailed-balances-${symbol}`, balance: {balance}, price, + balanceValue: balanceValue, + symbol, total, totalValue, className: styles.Children, @@ -289,7 +291,7 @@ export const parseBalancesTableInfo = ({ const { decimal } = getDecimalsAndSymbol(chainInfo, nativeSymbol) const accountDataArray: BalancesTableInfo[] = accountData.map( - ({ key, label, value }: any) => { + ({ key, label, value, tooltipText }: any) => { const valueWithDecimal = getBalanceWithDecimals({ totalBalance: value, decimals: decimal, @@ -303,28 +305,32 @@ export const parseBalancesTableInfo = ({ }) const chain = ( -
- -
{label}
+
+ +
{label}
+ +
) return { - key, + key: `detailed-balances-${key}`, chain: ( - {chain} - +
), balance: {balance}, + balanceValue: valueWithDecimal, price, total, totalValue, @@ -346,6 +352,25 @@ export const parseBalancesTableInfo = ({
) + const priceView = ( +
+ {price} + {!isMulti && } +
+ ) + + const totalView = ( +
+ + {!isMulti && ( + + )} +
+ ) + const chain = !isMulti ? ( + {isMulti ? ( +
{chain}
+ ) : ( + chain + )} + + ) + return { key: key, - chain: isMulti ?
{chain}
: chain, + chain: chainValue, + symbol: nativeSymbol, balance: getBalancePart(true), - price: !isMulti ? price : <>, - total: ( - - ), + price: !isMulti ? priceView : <>, + total: totalView, totalTokensValue, icon, name, @@ -392,7 +422,9 @@ export const parseBalancesTableInfo = ({ balanceWithoutChildren: getBalancePart(false), balanceValue, balanceView: getBalancePart(true), - links: ( + links: isMulti ? ( + [] + ) : ( ), - showLinks: (isShow: boolean) => ( - - ), - transferAction: ( + showLinks: (isShow: boolean) => + !isMulti && ( + + ), + transferAction: !isMulti && ( + )} + + + )} + +
{links || transferAction}
+ + {!isLastElement && ( +
+ +
+ )} +
+ +
+ {open && haveChildren && ( +
+ +
+ )} + + ) +} + +type InnerCildrenBalancesProps = { + value: T + className?: string + leftOffset: number + isLastElement?: boolean + level: number +} + +const InnerChildrenBalances = ({ + value, + leftOffset, + isLastElement, + level, +}: InnerCildrenBalancesProps) => { + const [ open, setOpen ] = useState(false) + const { balancesVariant } = useTableContext() + + const { + key, + chain, + balanceValue, + totalValue, + symbol, + showLinks, + children: innerChildren, + } = value + const childrenRowContentRef = React.useRef(null) + const isMulti = useIsMulti() + + const links = showLinks?.(!isMulti) + + const haveChildren = !!innerChildren || !isEmptyArray(innerChildren) + + const tokenBalance = ( + + ) + + const balanceInDollats = ( + + ) + + const childrenOffsetLeft = childrenRowContentRef.current?.offsetLeft || 0 + + let childrenOffset = leftOffset + offsetByIndex[level] + + const isDetailedBalances = key.includes('detailed-balances') + + if (isDetailedBalances) { + const chainCentricOffset = isMulti ? 62 : 11 + const tokenCentricOffset = isMulti ? 31 : 63 + + childrenOffset = + leftOffset + + (balancesVariant === 'tokens' ? tokenCentricOffset : chainCentricOffset) + } + + return ( +
+
setOpen(!open)}> +
+
+ {haveChildren && ( + + )} +
+
+
+ + {chain || symbol} + +
+ {tokenBalance} + ${balanceInDollats} +
+
+
{links}
+
+
+ +
+ {haveChildren && !isLastElement && open && ( +
+ +
+ )} +
+ ) +} + +type ChildrenBalancesProps = { + childrenBalances: T[] + className?: string + leftOffset: number + level: number +} + +const ChildrenBalances = ({ + childrenBalances, + className, + leftOffset, + level, +}: ChildrenBalancesProps) => { + return ( +
+ {childrenBalances?.map((children, i) => { + return ( + + ) + })} +
+ ) +} + +type BalanceCardsProps = { + data: T[] + noData: React.ReactNode +} + +const BalancesSectionCards = ({ + data, + noData, +}: BalanceCardsProps) => { + if (isEmptyArray(data)) return + + return ( +
+ {data.map((value, index) => { + return ( + + ) + })} +
+ ) +} + +export default BalancesSectionCards diff --git a/src/components/table/customCard/index.tsx b/src/components/table/customCard/index.tsx index dbf86134..2b042c2e 100644 --- a/src/components/table/customCard/index.tsx +++ b/src/components/table/customCard/index.tsx @@ -76,7 +76,8 @@ const CustomCard = ({ showLinks, } = value - const haveChildren = (!!children || !!cardChildren) || !isEmptyArray(children || cardChildren) + const haveChildren = + !!children || !!cardChildren || !isEmptyArray(children || cardChildren) const links = showLinks?.(true) @@ -137,12 +138,14 @@ const CustomCard = ({ )} - {(open && haveChildren) && + {open && + haveChildren && (children ? ( ) : ( @@ -153,23 +156,27 @@ const CustomCard = ({ ) } -type ChildrenBalancesProps = { +export type ChildrenBalancesProps = { name: string childrenBalances: T[] isSecondLevel?: boolean level: number + balanceKind: BalanceKind + className?: string } -const ChildrenBalances = ({ +export const ChildrenBalances = ({ childrenBalances, name, isSecondLevel = false, level, + balanceKind, + className }: ChildrenBalancesProps) => { const { isMobile } = useResponsiveSize() const isMulti = useIsMulti() - const balances = childrenBalances.map((child, index) => { + const balances = childrenBalances?.map((child, index) => { const isLastElement = index === childrenBalances.length - 1 return ( @@ -182,13 +189,16 @@ const ChildrenBalances = ({ name={name} isMulti={isMulti} level={level} + balanceKind={balanceKind} className={clsx( { ['bs-mb-2']: isMobile && isLastElement }, - isMobile && styles.ChildrenBalanceMargin + isMobile && + balanceKind !== 'NativeToken' && + styles.ChildrenBalanceMargin )} /> - {(isLastElement && isSecondLevel && level !== 3) && ( + {isLastElement && isSecondLevel && level !== 3 && ( )} @@ -197,7 +207,7 @@ const ChildrenBalances = ({ return ( <> -
+
{balances}
@@ -212,6 +222,7 @@ type InnerChildrenBalancesProps = { index: number level: number className?: string + balanceKind: BalanceKind } const balanceColumnClasses = @@ -223,6 +234,7 @@ const InnerChildrenBalances = ({ isMobile, level, className, + balanceKind, }: InnerChildrenBalancesProps) => { const [ open, setOpen ] = useState(false) const haveChildren = child?.children || child.cardChildren @@ -279,6 +291,7 @@ const InnerChildrenBalances = ({ childrenBalances={haveChildren as T[]} isSecondLevel level={level + 1} + balanceKind={balanceKind} /> ) : ( diff --git a/src/components/table/customTable/TableContext.tsx b/src/components/table/customTable/TableContext.tsx index 180fdb6e..b2027a39 100644 --- a/src/components/table/customTable/TableContext.tsx +++ b/src/components/table/customTable/TableContext.tsx @@ -1,13 +1,16 @@ -import { createContext, useContext, useState } from 'react' -import { useResponsiveSize } from 'src/components/responsive' +import { createContext, useContext, useEffect, useState } from 'react' import { TableView } from '../types' import store from 'store' +import { BalanceVariant } from './types' +import { BALANCE_TABLE_VARIANT } from '../utils' export type TableContextState = { tableView: TableView setTableView: (tableView: TableView) => void showZeroBalances: boolean setShowZeroBalances: (showZeroBalances: boolean) => void + balancesVariant: BalanceVariant + setBalancesVariant: (balancesVariant: BalanceVariant) => void } type TableContextProps = { @@ -21,26 +24,40 @@ export const TableContextWrapper: React.FC = ({ children, ...props }) => { - const { isMobile } = useResponsiveSize() const { storeShowZeroBalance, storeTableView } = props const tableViewFromStorage = store.get(storeTableView) const showZeroBalancesFromStorage = store.get(storeShowZeroBalance) + const tableVariantFromStore = store.get(BALANCE_TABLE_VARIANT) - const [ tableView, setTableView ] = useState( - isMobile ? 'cards' : tableViewFromStorage || 'table' + const [tableView, setTableView] = useState( + !tableViewFromStorage || tableViewFromStorage === 'cards' + ? 'table' + : tableViewFromStorage ) - const [ showZeroBalances, setShowZeroBalances ] = useState( + const [showZeroBalances, setShowZeroBalances] = useState( showZeroBalancesFromStorage !== undefined ? showZeroBalancesFromStorage : true ) + const [balancesVariant, setBalancesVariant] = useState( + tableVariantFromStore || 'chains' + ) + + useEffect(() => { + if (!tableViewFromStorage || tableViewFromStorage === 'cards') { + store.set(storeTableView, 'table') + } + }, [tableViewFromStorage]) + const value = { tableView, setTableView, showZeroBalances, setShowZeroBalances, + balancesVariant, + setBalancesVariant, } return {children} diff --git a/src/components/table/links/Links.tsx b/src/components/table/links/Links.tsx index d82cfe6f..0c057ef2 100644 --- a/src/components/table/links/Links.tsx +++ b/src/components/table/links/Links.tsx @@ -2,7 +2,6 @@ import { LinkWithIcon } from '../utils' import { linksByNetworks, NetworkLinks } from '.' import { Menu, Dropdown, Button, Divider } from 'antd' import { useCurrentAccount } from '../../providers/MyExtensionAccountsContext' -import { MoreOutlined } from '@ant-design/icons' import styles from './Links.module.sass' import { isDef } from '@subsocial/utils' import clsx from 'clsx' @@ -17,6 +16,7 @@ import { } from './utils' import { SubIcon } from 'src/components/utils' import { AiFillAppstore } from 'react-icons/ai' +import { LuMoreVertical } from 'react-icons/lu' type LinkButtonsOverlayProps = { network: string @@ -203,7 +203,7 @@ export const LinksButton = ({ ghost onClick={onMoreButtonClick} > - + ) diff --git a/src/components/table/types.ts b/src/components/table/types.ts index a5a6fb84..5d582d22 100644 --- a/src/components/table/types.ts +++ b/src/components/table/types.ts @@ -40,12 +40,13 @@ export type CommonTableInfo = { icon: string | JSX.Element key: string - chain: React.ReactNode + chain?: React.ReactNode balance: React.ReactNode balanceValue: BN price: React.ReactNode + symbol: string total: React.ReactNode totalValue: BN diff --git a/src/components/table/utils.tsx b/src/components/table/utils.tsx index 4c834122..845dd7e4 100644 --- a/src/components/table/utils.tsx +++ b/src/components/table/utils.tsx @@ -54,6 +54,7 @@ import { } from '../../rtk/features/identities/identitiesHooks' import { BIGNUMBER_ZERO } from '../../config/app/consts' import { useSendEvent } from '../providers/AnalyticContext' +import BalancesSectionCards from './customCard/BalancesSectionCard' export const BALANCE_TABLE_VIEW = 'BalanceTableView' export const BALANCE_TABLE_VARIANT = 'BalanceTableVariant' @@ -341,6 +342,19 @@ export const BalancePart = ({ if (isEmptyArray(tableData) && loading) return + if (isMobile) { + return balanceKind === 'NativeToken' ? ( + + ) : ( + + ) + } + switch (tableView) { case 'table': return ( @@ -364,10 +378,10 @@ export const BalancePart = ({ ) default: return ( - ) @@ -382,6 +396,7 @@ type ChainProps = { icon: string | JSX.Element name?: string isShortAddress?: boolean + withIcon?: boolean withCopy?: boolean avatarSize?: AvatarSize halfLength?: number @@ -441,6 +456,7 @@ export const ChainData = ({ withCopy = true, halfLength = 6, isMonosizedFont = true, + withIcon = true, withQr = true, isBoldName = true, desc, @@ -464,17 +480,19 @@ export const ChainData = ({ return (
- + {withIcon && ( + + )}
{name && (
{name} @@ -728,7 +746,7 @@ export const Address = ({ )} {withQr && ( @@ -770,7 +788,7 @@ export const AccountPreview = ({ largeAvatar = false, eventSource, nameClassName, - identityLoadNotRequired + identityLoadNotRequired, }: AccountPreviewProps) => { useFetchIdentities([ account ], identityLoadNotRequired) const identities = useIdentities(account) @@ -812,10 +830,10 @@ export const AccountPreview = ({ /> )}
-
+
{withName && accountName}
- {withAddress &&
{address}
} + {withAddress &&
{address}
}
@@ -829,6 +847,7 @@ export const getParentBalances = ( ) => { let balanceValueBN = BIGNUMBER_ZERO let totalValueBN = BIGNUMBER_ZERO + let totalTokensValueBN = BIGNUMBER_ZERO let priceValue let decimals = balances[0]?.decimals || 0 @@ -836,7 +855,9 @@ export const getParentBalances = ( .filter(isDef) .forEach(({ balanceValue, totalValue, totalTokensValue, price }) => { balanceValueBN = balanceValueBN.plus(balanceValue) - totalValueBN = totalValueBN.plus(totalTokensValue || totalValue) + totalValueBN = totalValueBN.plus(totalValue) + totalTokensValueBN = totalTokensValueBN.plus(totalTokensValue || 0) + priceValue = price }) @@ -856,6 +877,7 @@ export const getParentBalances = ( priceValue, balance, total, + totalTokensValueBN, } } diff --git a/src/components/utils/MutedText.tsx b/src/components/utils/MutedText.tsx index 5e44f9fc..bf3c256c 100644 --- a/src/components/utils/MutedText.tsx +++ b/src/components/utils/MutedText.tsx @@ -9,7 +9,7 @@ type Props = React.PropsWithChildren<{ function getClassNames (props: Props): string { const { smaller = false, className } = props - return `MutedText grey text ${smaller ? 'smaller' : ''} ${className}` + return `GrayText text ${smaller ? 'smaller' : ''} ${className}` } export const MutedSpan = (props: Props) => { diff --git a/src/i18n/en.json b/src/i18n/en.json index 93fd3fdd..70c19513 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -344,8 +344,8 @@ "table": { "balances": { "frozen": "Frozen", - "locked": "Locked balance", - "reserved": "Reserved balance", + "locked": "Locked", + "reserved": "Reserved", "free": "Transferable", "title": "Balances", "loading": "Loading account balances...", diff --git a/src/styles/bootstrap-utilities-4.3.1.css b/src/styles/bootstrap-utilities-4.3.1.css index 5bc79842..70baf277 100644 --- a/src/styles/bootstrap-utilities-4.3.1.css +++ b/src/styles/bootstrap-utilities-4.3.1.css @@ -237,6 +237,10 @@ min-width: fit-content !important; } +.w-fit { + width: fit-content !important; +} + .h-25 { height: 25% !important; } diff --git a/src/styles/subsocial-vars.scss b/src/styles/subsocial-vars.scss index 8a329ac5..5ba07fe1 100644 --- a/src/styles/subsocial-vars.scss +++ b/src/styles/subsocial-vars.scss @@ -35,6 +35,8 @@ $color_warn_border: #f3e8ac; $color_volcano: #fa541c; $color_gold: #faad14; $color_hover_selectable_bg: #fff0f6; +$color_gray: #64748B; +$color_gray_icon: #94A3B8; $color_green: #4bb543; $color_blue: #0099f4; $color_white: #fff; diff --git a/src/styles/subsocial.scss b/src/styles/subsocial.scss index 4150ddaf..030a2960 100644 --- a/src/styles/subsocial.scss +++ b/src/styles/subsocial.scss @@ -2477,4 +2477,12 @@ hr { margin-bottom: 0 !important; // padding-top: $space_normal; } +} + +.GrayText { + color: $color_gray; +} + +.GrayIcon { + color: $color_gray_icon; } \ No newline at end of file