|
|
@ -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 = { |
|
|
|