@atlaskit/profilecard
Version:
A React component to display a card with user information.
18 lines (17 loc) • 750 B
TypeScript
/// <reference types="react" />
import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
import { type PopupProps } from '@atlaskit/popup';
import { type ProfileCardErrorType, type ProfileType } from '../../types';
export type ProfileCardTriggerProps<T> = {
trigger: 'hover' | 'click';
ariaLabelledBy?: string;
disabledAriaAttributes?: boolean;
children: React.ReactNode;
renderProfileCard: ({ profileData, error, }: {
profileData?: T;
error: ProfileCardErrorType | undefined | null;
}) => React.ReactNode;
fetchProfile?: () => Promise<T>;
profileCardType: ProfileType;
fireAnalytics?: (payload: AnalyticsEventPayload) => void;
} & Omit<PopupProps, 'trigger' | 'isOpen' | 'content'>;