@atlaskit/mention
Version:
A React component used to display user profiles in a list for 'Mention' functionality
34 lines (33 loc) • 1.25 kB
TypeScript
import React from 'react';
import { type MentionEventHandler } from '../../types';
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
export declare const ANALYTICS_HOVER_DELAY = 1000;
export declare const UNKNOWN_USER_ID = "_|unknown|_";
export type OwnProps = {
id: string;
text: string;
isHighlighted?: boolean;
accessLevel?: string;
localId?: string;
onClick?: MentionEventHandler;
onMouseEnter?: MentionEventHandler;
onMouseLeave?: MentionEventHandler;
onHover?: () => void;
ssrPlaceholderId?: string;
};
export type Props = OwnProps & WithAnalyticsEventsProps;
export declare class MentionInternal extends React.PureComponent<Props, {}> {
private hoverTimeout?;
constructor(props: Props);
componentDidMount(): void;
private handleOnClick;
private handleOnMouseEnter;
private handleOnMouseLeave;
private getMentionType;
componentWillUnmount(): void;
renderUnknownUserError(id: string): React.JSX.Element;
render(): React.JSX.Element;
}
declare const Mention: React.ForwardRefExoticComponent<Omit<OwnProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
type Mention = MentionInternal;
export default Mention;