Skip to content

Commit

Permalink
Tabular number formatting for a uniformal look.
Browse files Browse the repository at this point in the history
  • Loading branch information
fwaalkens committed Oct 26, 2023
1 parent 4adbb07 commit 3490ead
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/Marine2/components/ui/ValueBar/ValueBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ interface Props {

const ValueBar = ({ values, prefix, forcePowerUnit, status }: Props) => (
<div className="flex border-t-2 border-victron-gray dark:border-victron-gray-200 px-2">
{prefix && <div className="mr-3 md:mr-6 text-victron-darkGray dark:text-victron-gray-500 tabular-nums">{prefix}</div>}
{prefix && (
<div className="mr-3 md:mr-6 text-victron-darkGray dark:text-victron-gray-500 tabular-nums">{prefix}</div>
)}
<div className="flex justify-between grow">
{values.map((v, id) => (
<ValueWithUnit
Expand All @@ -21,7 +23,7 @@ const ValueBar = ({ values, prefix, forcePowerUnit, status }: Props) => (
unit={v.unit}
hideDecimal={v.hideDecimal}
forcePowerUnit={forcePowerUnit}
className="md:min-w-[110px] bg-red-900 text-black dark:text-victron-gray-600 tabular-nums"
className="md:min-w-[110px] text-black dark:text-victron-gray-600 tabular-nums"
status={status}
/>
))}
Expand Down

0 comments on commit 3490ead

Please sign in to comment.