@awsui/components-react
Version:
On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en
33 lines • 1 kB
TypeScript
import { RefObject } from 'react';
interface StickyHeaderContextProps {
isStuck: boolean;
isStuckAtBottom: boolean;
}
interface ComputeOffsetProps {
isMobile: boolean;
__stickyOffset?: number;
__mobileStickyOffset?: number;
hasInnerOverflowParents: boolean;
__additionalOffset?: boolean;
}
export declare function computeOffset({
isMobile,
__stickyOffset,
__mobileStickyOffset,
hasInnerOverflowParents,
__additionalOffset
}: ComputeOffsetProps): string;
export declare const StickyHeaderContext: import("react").Context<StickyHeaderContextProps>;
export declare const useStickyHeader: (rootRef: RefObject<HTMLDivElement>, headerRef: RefObject<HTMLDivElement>, __stickyHeader?: boolean, __stickyOffset?: number, __mobileStickyOffset?: number, __disableMobile?: boolean, __additionalOffset?: boolean) => {
isSticky: boolean;
isStuck: boolean;
isStuckAtBottom: boolean;
stickyStyles: {
style: {
top: string;
};
} | {
style?: undefined;
};
};
export {};