From bc65484e1bd15fb6ccc9b94f23c991a170b8d39c Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 26 Jul 2017 15:10:50 -0700 Subject: Remove object spread syntax --- ui/app/components/dropdown.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ui/app/components/dropdown.js b/ui/app/components/dropdown.js index 70ed388f4..759800fd6 100644 --- a/ui/app/components/dropdown.js +++ b/ui/app/components/dropdown.js @@ -2,6 +2,7 @@ const Component = require('react').Component const PropTypes = require('react').PropTypes const h = require('react-hyperscript') const MenuDroppo = require('menu-droppo') +const extend = require('xtend') const noop = () => {} @@ -9,6 +10,13 @@ class Dropdown extends Component { render () { const { isOpen, onClickOutside, style, innerStyle, children } = this.props + const innerStyleDefaults = extend({ + borderRadius: '4px', + padding: '8px 16px', + background: 'rgba(0, 0, 0, 0.8)', + boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px', + }, innerStyle) + return h( MenuDroppo, { @@ -16,13 +24,7 @@ class Dropdown extends Component { zIndex: 11, onClickOutside, style, - innerStyle: { - borderRadius: '4px', - padding: '8px 16px', - background: 'rgba(0, 0, 0, 0.8)', - boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px', - ...innerStyle, - }, + innerStyle: innerStyleDefaults, }, [ h( -- cgit v1.2.3