mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
Add type definition for saveHashHistory option on Links (#46879)
This commit is contained in:
parent
74fcf0e889
commit
c2859fdc14
2
types/react-scroll/index.d.ts
vendored
2
types/react-scroll/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for react-scroll 1.5
|
||||
// Type definitions for react-scroll 1.8
|
||||
// Project: https://github.com/fisshy/react-scroll
|
||||
// Definitions by: Ioannis Kokkinidis <https://github.com/sudoplz>
|
||||
// Giedrius Grabauskas <https://github.com/GiedriusGrabauskas>
|
||||
|
||||
@ -16,6 +16,7 @@ export interface ReactScrollLinkProps {
|
||||
onSetActive?(to: string): void;
|
||||
onSetInactive?(): void;
|
||||
ignoreCancelEvents?: boolean;
|
||||
saveHashHistory?: boolean;
|
||||
}
|
||||
|
||||
export type LinkProps = ReactScrollLinkProps & React.HTMLProps<HTMLButtonElement>;
|
||||
|
||||
@ -110,6 +110,17 @@ const linkTest5 = (
|
||||
</Link>
|
||||
);
|
||||
|
||||
const linkTest6 = (
|
||||
<Link
|
||||
to="target"
|
||||
saveHashHistory={true}
|
||||
spy={true}
|
||||
hashSpy={true}
|
||||
>
|
||||
Test 7 (hash history)
|
||||
</Link>
|
||||
);
|
||||
|
||||
const options = {} as any;
|
||||
animateScroll.scrollToTop(options);
|
||||
animateScroll.scrollToBottom(options);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user