The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Rocket.Chat/client/components/ScrollableContentWrapper.tsx

21 lines
629 B

import React, { FC } from 'react';
import SimpleBar from 'simplebar-react';
import 'simplebar/src/simplebar.css';
import { useDir } from '../hooks/useDir';
const style = {
maxHeight: '100%', flexGrow: 1,
};
type CustomScrollbarsProps = {
onScroll?: Function;
ref: React.Ref<unknown>;
}
const ScrollableContentWrapper: FC<CustomScrollbarsProps> = React.memo(React.forwardRef(({ onScroll, children }, ref) => {
const dir = useDir();
return <SimpleBar data-simplebar-direction={dir} direction={dir} style={style} scrollableNodeProps={{ ref, onScroll }} children={children}/>;
}));
export default ScrollableContentWrapper;