Skip to content

Commit

Permalink
[Explorer]: minor fixes (#10690)
Browse files Browse the repository at this point in the history
## Description 

- Update paddings on `HomeMetrics` to be able to scroll to the edge of
container
- https://mysten.atlassian.net/browse/APPS-747


![scrollarea](https://user-images.githubusercontent.com/127577476/231021442-1644fe09-8b33-44f1-9714-c82c297d0c1a.gif)


## Test Plan 

How did you test the new or updated feature?

---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.

### Type of Change (Check all that apply)

- [x] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes

---------

Co-authored-by: Phong Lam <[email protected]>
  • Loading branch information
plam-ml and Phong Lam authored Apr 18, 2023
1 parent 5024a4a commit df80857
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions apps/explorer/src/components/HomeMetrics/MetricGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ interface Props {
export function MetricGroup({ label, children }: Props) {
return (
<div className="flex flex-col gap-4">
<div className="flex items-center gap-2.5">
<div className="flex items-center gap-2.5 px-8">
<Text variant="caption/semibold" color="steel-darker">
{label}
</Text>
<div className="h-px flex-1 bg-steel/30" />
</div>
<div className="flex items-start gap-10 overflow-x-auto overflow-y-hidden pb-1">
<div className="flex items-start gap-6 overflow-x-auto overflow-y-hidden pb-1 pl-8 md:gap-8">
{children}
</div>
</div>
Expand Down
16 changes: 10 additions & 6 deletions apps/explorer/src/components/HomeMetrics/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ function StatsWrapper(props: StatsProps) {
function FormattedStatsAmount({
amount,
...props
}: Omit<StatsProps, 'children'> & { amount?: string | number | bigint }) {
}: Omit<StatsProps, 'children'> & {
amount?: string | number | bigint;
}) {
const [formattedAmount, postfix] = formatAmountParts(amount);

return (
Expand Down Expand Up @@ -64,12 +66,14 @@ export function HomeMetrics() {
);

return (
<Card spacing="lg">
<Heading variant="heading4/semibold" color="steel-darker">
Sui Network Stats
</Heading>
<Card spacing="none">
<div className="pl-8 pt-8">
<Heading variant="heading4/semibold" color="steel-darker">
Sui Network Stats
</Heading>
</div>

<div className="mt-8 space-y-7">
<div className="mt-8 space-y-7 pb-8">
<MetricGroup label="Current">
<StatsWrapper
label="TPS Now / Peak 30D"
Expand Down

0 comments on commit df80857

Please sign in to comment.