Skip to content

Commit

Permalink
fix: format token value
Browse files Browse the repository at this point in the history
  • Loading branch information
yyyyaaa committed Dec 14, 2023
1 parent 1a8c94f commit c04347f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/react/stories/nft/NftProfileCard.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ export const Primary: Story = {
priceItems: [
{
label: "Highest offer",
value: "450",
value: "450.55",
},
{
label: "Listing price",
value: "373",
value: "373.66",
},
],
onClick() {
Expand Down
3 changes: 2 additions & 1 deletion src/ui/star-text/star-text.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Box from "../box";
import Stack from "../stack";
import Icon from "../icon";
import Text from "../text";
import { formatNumeric } from "../../helpers/number";

import type { StarTextProps } from "./star-text.types";

Expand Down Expand Up @@ -42,7 +43,7 @@ export default function StarText(props: StarTextProps) {
fontSize={props.size === "md" ? "$sm" : "$xl"}
fontWeight="$semibold"
attributes={{ marginRight: "$3" }}
>{`${props.value} ${props.tokenName}`}</Text>
>{`${formatNumeric(props.value, 2)} ${props.tokenName}`}</Text>

<Show when={!props.iconSrc && props.showTokenIcon}>
<Icon
Expand Down

0 comments on commit c04347f

Please sign in to comment.