DefinitelyTyped/types/react-custom-scroll/react-custom-scroll-tests.tsx
Guy Romm 6df6e314df
Type definitions for react-custom-scroll (#45628)
* Type definitions for react-custom-scroll

* fix tests
2020-06-23 14:22:28 -04:00

30 lines
748 B
TypeScript

import * as React from 'react';
import CustomScroll from 'react-custom-scroll';
const onScrollStub = () => 1;
export const _ = () => (
<>
<CustomScroll>
<div>Test content</div>
<div>Test content</div>
</CustomScroll>
,
<CustomScroll
heightRelativeToParent="50%"
allowOuterScroll={false}
flex={2}
onScoll={onScrollStub}
addScrolledClass={true}
freezePosition={false}
minScrollHandleHeight={50}
rtl={false}
scrollTo={20}
keepAtBottom={false}
>
<div>Test content</div>
<div>Test content</div>
</CustomScroll>
,
</>
);