Re-enable css transitions for dropdowns in header, needs menu-droppo library update

feature/default_network_editable
sdtsui 7 years ago
parent 650956934c
commit 781ac00eac
  1. 2
      ui/app/app.js
  2. 1
      ui/app/components/account-dropdowns.js
  3. 4
      ui/app/components/dropdown.js

@ -218,6 +218,7 @@ App.prototype.renderNetworkDropdown = function () {
const isOpen = state.isNetworkMenuOpen const isOpen = state.isNetworkMenuOpen
return h(Dropdown, { return h(Dropdown, {
useCssTransition: true,
isOpen, isOpen,
onClickOutside: (event) => { onClickOutside: (event) => {
const { classList } = event.target const { classList } = event.target
@ -355,6 +356,7 @@ App.prototype.renderDropdown = function () {
const isOpen = state.isMainMenuOpen const isOpen = state.isMainMenuOpen
return h(Dropdown, { return h(Dropdown, {
useCssTransition: true,
isOpen: isOpen, isOpen: isOpen,
zIndex: 11, zIndex: 11,
onClickOutside: (event) => { onClickOutside: (event) => {

@ -65,6 +65,7 @@ class AccountDropdowns extends Component {
return h( return h(
Dropdown, Dropdown,
{ {
useCssTransition: true, // Hardcoded because account selector is temporarily in app-header
style: { style: {
marginLeft: '-238px', marginLeft: '-238px',
marginTop: '38px', marginTop: '38px',

@ -8,7 +8,7 @@ const noop = () => {}
class Dropdown extends Component { class Dropdown extends Component {
render () { render () {
const { isOpen, onClickOutside, style, innerStyle, children } = this.props const { isOpen, onClickOutside, style, innerStyle, children, useCssTransition } = this.props
const innerStyleDefaults = extend({ const innerStyleDefaults = extend({
borderRadius: '4px', borderRadius: '4px',
@ -20,6 +20,7 @@ class Dropdown extends Component {
return h( return h(
MenuDroppo, MenuDroppo,
{ {
useCssTransition,
isOpen, isOpen,
zIndex: 11, zIndex: 11,
onClickOutside, onClickOutside,
@ -43,6 +44,7 @@ class Dropdown extends Component {
Dropdown.defaultProps = { Dropdown.defaultProps = {
isOpen: false, isOpen: false,
onClick: noop, onClick: noop,
useCssTransition: false,
} }
Dropdown.propTypes = { Dropdown.propTypes = {

Loading…
Cancel
Save