mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
Remove es6-class style tests
This commit is contained in:
parent
fe9ddf224e
commit
2396a70919
8
react-onclickoutside/index.d.ts
vendored
8
react-onclickoutside/index.d.ts
vendored
@ -3,8 +3,6 @@
|
||||
// Definitions by: Karol Janyst <https://github.com/LKay>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import * as React from "react"
|
||||
|
||||
declare namespace ReactOnClickOutside {
|
||||
interface OnClickOutsideComponent {
|
||||
handleClickOutside(e: React.MouseEvent<any>): void
|
||||
@ -24,7 +22,5 @@ declare namespace ReactOnClickOutside {
|
||||
}
|
||||
}
|
||||
|
||||
declare module "react-onclickoutside" {
|
||||
const onClickOutside: ReactOnClickOutside.onClickOutside
|
||||
export = onClickOutside
|
||||
}
|
||||
declare const onClickOutside: ReactOnClickOutside.onClickOutside
|
||||
export = onClickOutside;
|
||||
@ -8,22 +8,14 @@ import { Component, StatelessComponent, MouseEvent } from "react"
|
||||
import { render } from "react-dom"
|
||||
import * as onClickOutside from "react-onclickoutside"
|
||||
|
||||
interface TestProps extends ReactOnClickOutside.OnClickOutsideProps {}
|
||||
interface TestProps {}
|
||||
|
||||
var TestStateless: StatelessComponent<TestProps> = (props: TestProps) => {
|
||||
return (<div>Test</div>)
|
||||
}
|
||||
|
||||
var TestStatelessWrapped = onClickOutside(TestStateless)
|
||||
|
||||
class Test extends Component<TestProps, any> implements ReactOnClickOutside.OnClickOutsideComponent {
|
||||
handleClickOutside (e: MouseEvent<any>) {}
|
||||
|
||||
render () {
|
||||
return (<div>Test</div>)
|
||||
}
|
||||
}
|
||||
var TestWrapped = onClickOutside(Test)
|
||||
|
||||
render(
|
||||
<TestStatelessWrapped eventTypes="click"
|
||||
disableOnClickOutside
|
||||
@ -31,13 +23,4 @@ render(
|
||||
stopPropagation
|
||||
outsideClickIgnoreClass="ignore" />,
|
||||
document.getElementById("main")
|
||||
)
|
||||
|
||||
render(
|
||||
<TestWrapped eventTypes={ ["click", "touchend"] }
|
||||
disableOnClickOutside
|
||||
preventDefault
|
||||
stopPropagation
|
||||
outsideClickIgnoreClass="ignore" />,
|
||||
document.getElementById("main")
|
||||
)
|
||||
)
|
||||
Loading…
Reference in New Issue
Block a user