From 9f7438e756a06b1c6fcdac1d1bf1ea32a63a9cd7 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Sat, 23 Nov 2019 12:51:37 -0330 Subject: [PATCH] Convert FiatValue component to JSX (#7515) --- ui/app/components/ui/fiat-value.js | 60 ++++++++++++++++-------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/ui/app/components/ui/fiat-value.js b/ui/app/components/ui/fiat-value.js index cabdd479d..e3e2fd6be 100644 --- a/ui/app/components/ui/fiat-value.js +++ b/ui/app/components/ui/fiat-value.js @@ -1,5 +1,4 @@ -const Component = require('react').Component -const h = require('react-hyperscript') +import React, { Component } from 'react' const inherits = require('util').inherits const formatBalance = require('../../helpers/utils/util').formatBalance @@ -38,31 +37,38 @@ function fiatDisplay (fiatDisplayNumber, fiatSuffix, styleOveride = {}) { const { fontSize, color, fontFamily, lineHeight } = styleOveride if (fiatDisplayNumber !== 'N/A') { - return h('.flex-row', { - style: { - alignItems: 'flex-end', - lineHeight: lineHeight || '13px', - fontFamily: fontFamily || 'Montserrat Light', - textRendering: 'geometricPrecision', - }, - }, [ - h('div', { - style: { - width: '100%', - textAlign: 'right', - fontSize: fontSize || '12px', - color: color || '#333333', - }, - }, fiatDisplayNumber), - h('div', { - style: { - color: color || '#AEAEAE', - marginLeft: '5px', - fontSize: fontSize || '12px', - }, - }, fiatSuffix), - ]) + return ( +
+
+ {fiatDisplayNumber} +
+
+ {fiatSuffix} +
+
+ ) } else { - return h('div') + return
} }