Improve styling, accessebility, usability and use mutation

This commit is contained in:
Chi Vinh Le
2018-08-03 15:57:14 +02:00
parent d05508d574
commit 1376ed255b
21 changed files with 202 additions and 147 deletions
@@ -2,7 +2,7 @@ import React from "react";
import { findDOMNode } from "react-dom";
export interface ClickOutsideProps {
onClickOutside: () => void;
onClickOutside: (e?: MouseEvent) => void;
children: React.ReactNode;
}
@@ -13,7 +13,7 @@ class ClickOutside extends React.Component<ClickOutsideProps> {
const { onClickOutside } = this.props;
if (!e || !this.domNode!.contains(e.target as HTMLInputElement)) {
// tslint:disable-next-line:no-unused-expression
onClickOutside && onClickOutside();
onClickOutside && onClickOutside(e);
}
};