Skip to content

Commit 5d91679

Browse files
authored
Improve asset stats scroll (#845)
1 parent 2c571c6 commit 5d91679

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/ui/pages/AssetInfo/AssetGlobalStats.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { formatCurrencyValue } from 'src/shared/units/formatCurrencyValue';
55
import { formatPercent } from 'src/shared/units/formatPercent';
66
import { HStack } from 'src/ui/ui-kit/HStack';
77
import { UIText } from 'src/ui/ui-kit/UIText';
8+
import * as styles from './styles.module.css';
89

910
const ONE_DAY = 24 * 60 * 60 * 1000;
1011
const ONE_HOUR = 60 * 60 * 1000;
@@ -57,7 +58,7 @@ export function AssetGlobalStats({
5758
);
5859

5960
return (
60-
<HStack gap={8} style={{ width: '100%', overflowX: 'auto' }}>
61+
<HStack gap={8} className={styles.statsContainer}>
6162
{createdRecently ? (
6263
<AssetStatsChip title="AGE" value={`${ageInHours}h`} />
6364
) : null}

src/ui/pages/AssetInfo/styles.module.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,17 @@
6565
-webkit-text-fill-color: transparent;
6666
background-clip: text;
6767
}
68+
69+
.statsContainer {
70+
width: 100%;
71+
overflow-x: auto;
72+
scrollbar-width: none; /* Firefox */
73+
-ms-overflow-style: none; /* IE and Edge */
74+
-webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
75+
user-select: none; /* Prevent text selection during drag */
76+
}
77+
78+
/* Hide scrollbar for Webkit browsers */
79+
.statsContainer::-webkit-scrollbar {
80+
display: none;
81+
}

0 commit comments

Comments
 (0)