@atlaskit/analytics-next
Version:
React components, HOCs and hooks to assist with tracking user activity with React components
13 lines (12 loc) • 859 B
TypeScript
import React from 'react';
import type { CreateEventMap, CreateUIAnalyticsEvent } from '../types';
export interface WithAnalyticsEventsProps {
/**
* You should not be accessing this prop under any circumstances.
* It is provided by `@atlaskit/analytics-next` and integrated in the component
*/
createAnalyticsEvent?: CreateUIAnalyticsEvent;
ref?: React.Ref<any>;
}
declare const withAnalyticsEvents: (createEventMap?: CreateEventMap) => <Props, Component>(WrappedComponent: (React.ComponentType<WithAnalyticsEventsProps & Props> | React.ForwardRefExoticComponent<Omit<WithAnalyticsEventsProps, "ref"> & Props>) & Component) => React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Omit<Props, keyof WithAnalyticsEventsProps>>> & React.RefAttributes<any>>;
export default withAnalyticsEvents;