Skip to content

Commit

Permalink
style(wallet, common): update styling in AccountAssets and TitledValu…
Browse files Browse the repository at this point in the history
…e components for improved layout and visual consistency
  • Loading branch information
fedosov committed Jan 23, 2025
1 parent 8527939 commit 7e9adf9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/components/common/TitledValue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function TitledValue({
fontSmall = false,
...attrs
}: TitledValueProps) {
let valueClassName = "truncate";
let valueClassName = "";
if (fontMono) {
valueClassName += " font-mono";
}
Expand Down
27 changes: 16 additions & 11 deletions app/components/wallet/AccountAssets.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Spinner, SpinnerSize } from "@blueprintjs/core";
import { Button, Icon, Spinner, SpinnerSize } from "@blueprintjs/core";
import type { KeyringPair } from "@polkadot/keyring/types";
import type { Codec } from "@polkadot/types/types";
import { useEffect, useState } from "react";
Expand Down Expand Up @@ -102,23 +102,28 @@ export default function AccountAssets({ pair, onSend }: IProps) {
<Button
minimal
small
className="p-0 h-auto font-mono"
className="p-0 px-1 -mx-1 h-auto font-mono"
onClick={() =>
onSend?.({
id: asset.assetId,
metadata: asset.metadata,
})
}
>
<FormattedAmount
value={asset.balance}
decimals={
asset.metadata
? Number.parseInt(asset.metadata.decimals)
: 0
}
unit={asset.metadata?.symbol}
/>
<div className="inline-flex items-center justify-start gap-1">
<div>
<FormattedAmount
value={asset.balance}
decimals={
asset.metadata
? Number.parseInt(asset.metadata.decimals)
: 0
}
unit={asset.metadata?.symbol}
/>
</div>
<Icon icon="send-to" size={10} className="opacity-50" />
</div>
</Button>
</div>
))}
Expand Down

0 comments on commit 7e9adf9

Please sign in to comment.