diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-08-29 06:07:24 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-08-29 06:07:24 +0800 |
commit | 8e14e65b60bc4b94ba686c7bb5467bb4a5e2c645 (patch) | |
tree | ca32d943eb177efc65d2df9cfd753524434cdb4f /packages/website/ts/components/ui | |
parent | 2d1d14d2e42623d5345b6c1e64e39a87b7c3a223 (diff) | |
download | dexon-0x-contracts-8e14e65b60bc4b94ba686c7bb5467bb4a5e2c645.tar dexon-0x-contracts-8e14e65b60bc4b94ba686c7bb5467bb4a5e2c645.tar.gz dexon-0x-contracts-8e14e65b60bc4b94ba686c7bb5467bb4a5e2c645.tar.bz2 dexon-0x-contracts-8e14e65b60bc4b94ba686c7bb5467bb4a5e2c645.tar.lz dexon-0x-contracts-8e14e65b60bc4b94ba686c7bb5467bb4a5e2c645.tar.xz dexon-0x-contracts-8e14e65b60bc4b94ba686c7bb5467bb4a5e2c645.tar.zst dexon-0x-contracts-8e14e65b60bc4b94ba686c7bb5467bb4a5e2c645.zip |
Revert "Enable hovering state for dropdown"
This reverts commit ac1640140c9279ac9e8a92d84702a2f84d9165fb.
Diffstat (limited to 'packages/website/ts/components/ui')
-rw-r--r-- | packages/website/ts/components/ui/drop_down.tsx | 13 | ||||
-rw-r--r-- | packages/website/ts/components/ui/popover.tsx | 3 |
2 files changed, 7 insertions, 9 deletions
diff --git a/packages/website/ts/components/ui/drop_down.tsx b/packages/website/ts/components/ui/drop_down.tsx index 32105d353..638b29f88 100644 --- a/packages/website/ts/components/ui/drop_down.tsx +++ b/packages/website/ts/components/ui/drop_down.tsx @@ -32,8 +32,8 @@ export class DropDown extends React.Component<DropDownProps, DropDownState> { public static defaultProps: Partial<DropDownProps> = { style: DEFAULT_STYLE, zDepth: 1, - activateEvent: DropdownMouseEvent.Hover, - closeEvent: DropdownMouseEvent.Hover, + activateEvent: DropdownMouseEvent.Click, + closeEvent: DropdownMouseEvent.Click, }; private _popoverCloseCheckIntervalId: number; public static getDerivedStateFromProps(props: DropDownProps, state: DropDownState): Partial<DropDownState> { @@ -77,6 +77,8 @@ export class DropDown extends React.Component<DropDownProps, DropDownState> { zIndex={this.props.zDepth} > <div + onMouseEnter={this._onHover.bind(this)} + onMouseLeave={this._onHoverOff.bind(this)} onClick={this._closePopover.bind(this)} > {this.props.popoverContent} @@ -95,13 +97,10 @@ export class DropDown extends React.Component<DropDownProps, DropDownState> { } } private _onHover(event: React.FormEvent<HTMLInputElement>): void { - this.setState({ - isHovering: true, - anchorEl: event.currentTarget, - }); + this.setState({ isHovering: true }); } private _onHoverOff(): void { - this.setState({ isHovering: false, anchorEl: undefined }); + this.setState({ isHovering: false }); } private _checkIfShouldClosePopover(): void { if (!this.state.isDropDownOpen) { diff --git a/packages/website/ts/components/ui/popover.tsx b/packages/website/ts/components/ui/popover.tsx index 556e8b110..66c0ac663 100644 --- a/packages/website/ts/components/ui/popover.tsx +++ b/packages/website/ts/components/ui/popover.tsx @@ -20,7 +20,6 @@ const PopoverContainer = styled.div` max-height: 679px; overflow-y: auto; border-radius: 2px; - box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 6px, rgba(0, 0, 0, 0.12) 0px 1px 4px; `; const defaultPlacement: Placement = 'bottom'; @@ -38,7 +37,7 @@ export class Popover extends React.Component<PopoverProps> { }; return ( <div> - {/* <Overlay onClick={onRequestClose} style={overlayStyleOverrides}/> */} + <Overlay onClick={onRequestClose} style={overlayStyleOverrides}/> <Popper referenceElement={anchorEl} placement="bottom" eventsEnabled={true}> {this._renderPopperChildren.bind(this)} </Popper> |