From 364ef7da4e8b68ba858b72756bd3d6a53461aa5a Mon Sep 17 00:00:00 2001 From: Theophile Sandoz Date: Fri, 29 Mar 2024 11:04:59 +0100 Subject: [PATCH] Add a unit prop to the `Numeric` proposal details renderer --- .../ProposalDetails/renderers/Numeric.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/proposals/components/ProposalDetails/renderers/Numeric.tsx b/packages/ui/src/proposals/components/ProposalDetails/renderers/Numeric.tsx index 7579ebcb8e..7668077c90 100644 --- a/packages/ui/src/proposals/components/ProposalDetails/renderers/Numeric.tsx +++ b/packages/ui/src/proposals/components/ProposalDetails/renderers/Numeric.tsx @@ -2,10 +2,21 @@ import BN from 'bn.js' import React from 'react' import { NumericValueStat } from '@/common/components/statistics' +import { TextSmall } from '@/common/components/typography' interface Props { label: string value: BN + units?: string } -export const Numeric = ({ label, value }: Props) => +export const Numeric = ({ label, value, units }: Props) => ( + + {units && ( + + {' '} + {units} + + )} + +)