mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-04 16:04:45 +08:00
Changed way of testing
This commit is contained in:
@@ -1,31 +1,13 @@
|
||||
/// <reference path="../react/react.d.ts" />
|
||||
/// <reference path="./react-scroll.d.ts" />
|
||||
/// <reference path="../react/react-dom.d.ts"/>
|
||||
|
||||
import { Component } from 'react'
|
||||
import * as ReactDOM from 'react-dom';
|
||||
import { Link, Element, Events, scroller } from 'react-scroll'
|
||||
|
||||
class LinkTest extends Component<any, any> {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<Link to="test" spy={true} smooth={true}>Dashboard</Link>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class ElementTest extends Component<any, any> {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<Element name="test" >Test</Element>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
let link = <Link to="test" spy={true} smooth={true}>Dashboard</Link>;
|
||||
let element = <Element name="test" >Test</Element>;
|
||||
|
||||
scroller.scrollTo("test");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user