DefinitelyTyped/types/react-sticky-el/react-sticky-el-tests.tsx
2018-05-30 12:51:36 -07:00

24 lines
630 B
TypeScript

import * as React from "react";
import Sticky from "react-sticky-el";
const StickyBasic = () => <Sticky />;
const StickyAllFeatures = () => (
<Sticky
mode="bottom"
disabled
onFixedToggle={fixed => fixed}
wrapperCmp="div"
holderCmp={<div />}
holderProps={{ title: "a title" }}
boundaryElement=".an-element"
scrollElement=".another-element"
positionRecheckInterval={0}
stickyStyle={{ display: "block" }}
stickyClassName="sticky"
topOffset={0}
bottomOffset={0}
hideOnBoundaryHit
children="a child"
/>
);