@flexis/ui
Version:
Styleless React Components
58 lines • 1.91 kB
TypeScript
import { HTMLAttributes, ReactNode, PureComponent } from 'react';
import PropTypes from 'prop-types';
import { CombinePropsAndAttributes } from '../../helpers';
interface ISelfProps {
ignoreTopShadow?: boolean;
ignoreRightShadow?: boolean;
ignoreBottomShadow?: boolean;
ignoreLeftShadow?: boolean;
hideXScrollbar?: boolean;
hideYScrollbar?: boolean;
y2xScroll?: boolean;
children?: ReactNode;
}
export declare type IProps = CombinePropsAndAttributes<ISelfProps, HTMLAttributes<HTMLDivElement>>;
interface IState {
topShadow: boolean;
rightShadow: boolean;
bottomShadow: boolean;
leftShadow: boolean;
}
export default class ScrollArea extends PureComponent<IProps, IState> {
static propTypes: {
ignoreTopShadow: PropTypes.Requireable<boolean>;
ignoreRightShadow: PropTypes.Requireable<boolean>;
ignoreBottomShadow: PropTypes.Requireable<boolean>;
ignoreLeftShadow: PropTypes.Requireable<boolean>;
hideXScrollbar: PropTypes.Requireable<boolean>;
hideYScrollbar: PropTypes.Requireable<boolean>;
y2xScroll: PropTypes.Requireable<boolean>;
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
};
static defaultProps: {
ignoreTopShadow: boolean;
ignoreRightShadow: boolean;
ignoreBottomShadow: boolean;
ignoreLeftShadow: boolean;
hideXScrollbar: boolean;
hideYScrollbar: boolean;
y2xScroll: boolean;
};
state: {
topShadow: boolean;
rightShadow: boolean;
bottomShadow: boolean;
leftShadow: boolean;
};
private isHiddenScrollbar;
private scroller;
render(): JSX.Element;
componentDidUpdate(): void;
private onScrollerRef;
private onScroll;
private onWheel;
private setShadow;
private hideScroll;
}
export {};
//# sourceMappingURL=ScrollArea.d.ts.map