UNPKG

@funkit/connect

Version:

Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.

32 lines (31 loc) 1.61 kB
import React, { type ReactNode } from 'react'; import type { Address } from 'viem'; interface CustomStatusAnimationParams { depositAddress: Address | undefined; /** Whether this is an active checkout (i.e. not history) */ isActiveCheckout: boolean; /** Whether status icon is currently shown */ isCheckoutDetailView: boolean; /** Top padding of the scrolling container (required to set the correct position) */ paddingTop: number; /** Modal topbar */ topbar: ReactNode; /** Whether to show the topbar divider when _not_ in checkout detail view */ withTopDivider: 'always' | 'never' | 'scroll' | undefined; /** ID of the element to scroll (main dialog content) when scrolling over the overflowed title */ scrollableContent: string; } interface CustomStatusAnimationReturn { /** To be passed to scrolling container, to sync the scroll position */ onScroll: React.UIEventHandler<HTMLElement>; /** Modal topbar, to which a modulated-opacity background was added */ topbar: ReactNode; /** Whether to show the topbar divider */ withTopDivider: 'always' | 'never' | 'scroll' | undefined; } /** * Hook for sharing the logic for the custom status icon animation in checkout details. This is very * much _not_ generic or intended to be reused anywhere, but the component itself is duplicated. */ export declare function useCustomStatusAnimationAboveTopbar({ depositAddress, isActiveCheckout, isCheckoutDetailView, paddingTop, topbar, withTopDivider, scrollableContent, }: CustomStatusAnimationParams): CustomStatusAnimationReturn; export {};