@rebuy/hydrogen-sdk
Version:
The React/Hydrogen wrapper for the Rebuy Core SDK.
20 lines (19 loc) • 1.11 kB
TypeScript
type RecentlyViewedProps = {
className?: string;
emptyComponent?: React.ReactNode;
limit?: number;
loadingComponent?: React.ReactNode;
onError?: (error: Error) => void;
};
/**
* RecentlyViewed - Component that displays recently viewed products
*
* @param {RecentlyViewedProps} props - Component props
* @param {string} props.className - Optional CSS class name for the container
* @param {*} props.emptyComponent - Optional component to show when no products are available
* @param {number} props.limit - Maximum number of products to display (default: 5)
* @param {*} props.loadingComponent - Optional component to show while loading
* @param {Function} props.onError - Optional callback for handling errors
*/
export declare const RecentlyViewed: ({ className, emptyComponent, limit, loadingComponent, onError, }: RecentlyViewedProps) => string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null;
export {};