This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-js/lib/src/widget/scroller.d.ts
2021-09-03 16:51:06 +08:00

35 lines
982 B
TypeScript

import { Superview, View, NativeViewModel } from '../ui/view';
import { BridgeContext } from '../runtime/global';
export declare function scroller(content: View, config?: Partial<Scroller>): Scroller;
export declare class Scroller extends Superview implements JSX.ElementChildrenAttribute {
content: View;
contentOffset?: {
x: number;
y: number;
};
onScroll?: (offset: {
x: number;
y: number;
}) => void;
onScrollEnd?: (offset: {
x: number;
y: number;
}) => void;
scrollable?: boolean;
/**
* Take effect only on iOS
*/
bounces?: boolean;
allSubviews(): View[];
toModel(): NativeViewModel;
scrollTo(context: BridgeContext, offset: {
x: number;
y: number;
}, animated?: boolean): Promise<any>;
scrollBy(context: BridgeContext, offset: {
x: number;
y: number;
}, animated?: boolean): Promise<any>;
set innerElement(e: View);
}