mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
29 lines
509 B
TypeScript
29 lines
509 B
TypeScript
/// <reference path="../react/react.d.ts" />
|
|
/// <reference path="./react-scroll.d.ts" />
|
|
|
|
import { Component } from 'react'
|
|
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>
|
|
}
|
|
}
|
|
|
|
scroller.scrollTo("test");
|
|
|
|
|