UNPKG

@atlaskit/mention

Version:

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

17 lines 539 B
import React from 'react'; import { renderHighlight } from '../MentionItem/MentionHighlightHelpers'; import { DescriptionBylineStyle } from './styles'; export default class UserMentionDescriptionByline extends React.PureComponent { render() { const { highlight, name, nickname } = this.props.mention; const nicknameHighlights = highlight && highlight.nickname; if (name === nickname) { return null; } return renderHighlight(DescriptionBylineStyle, nickname, nicknameHighlights, '@'); } }