UNPKG

@atlaskit/mention

Version:

A React component used to display user profiles in a list for 'Mention' functionality

25 lines 1.14 kB
import * as tslib_1 from "tslib"; import * as React from 'react'; import { UserType } from '../../types'; import UserMentionDescriptionHighlight from './UserMentionDescriptionHighlight'; import TeamMentionDescriptionHighlight from './TeamMentionDescriptionHighlight'; var MentionDescriptionHighlight = /** @class */ (function (_super) { tslib_1.__extends(MentionDescriptionHighlight, _super); function MentionDescriptionHighlight() { return _super !== null && _super.apply(this, arguments) || this; } MentionDescriptionHighlight.prototype.render = function () { var userType = this.props.mention.userType; switch (userType) { case UserType[UserType.TEAM]: { return React.createElement(TeamMentionDescriptionHighlight, { mention: this.props.mention }); } default: { return React.createElement(UserMentionDescriptionHighlight, { mention: this.props.mention }); } } }; return MentionDescriptionHighlight; }(React.PureComponent)); export default MentionDescriptionHighlight; //# sourceMappingURL=index.js.map