aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send/currency-toggle.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/send/currency-toggle.js')
-rw-r--r--ui/app/components/send/currency-toggle.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/ui/app/components/send/currency-toggle.js b/ui/app/components/send/currency-toggle.js
new file mode 100644
index 000000000..37c026542
--- /dev/null
+++ b/ui/app/components/send/currency-toggle.js
@@ -0,0 +1,26 @@
+const Component = require('react').Component
+const h = require('react-hyperscript')
+const inherits = require('util').inherits
+module.exports = CurrencyToggle
+
+inherits(CurrencyToggle, Component)
+function CurrencyToggle () {
+ Component.call(this)
+}
+
+CurrencyToggle.prototype.render = function () {
+ const { onClick, currentCurrency } = this.props
+
+ return h('span', {}, [
+ h('span', {
+ className: currentCurrency === 'ETH' ? 'selected-currency' : 'unselected-currency',
+ onClick: () => onClick('ETH')
+ }, ['ETH']),
+ '<>',
+ h('span', {
+ className: currentCurrency === 'USD' ? 'selected-currency' : 'unselected-currency',
+ onClick: () => onClick('USD'),
+ }, ['USD']),
+ ]) //holding on icon from design
+}
+