UNPKG

@atlaskit/profilecard

Version:

A React component to display a card with user information.

28 lines (27 loc) 911 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _reactIntlNext = require("react-intl-next"); var getLabelMessage = function getLabelMessage(ariaLabelProp, fullName, formatMessage) { if (ariaLabelProp) { return ariaLabelProp; } return fullName ? formatMessage(messages.label, { fullName: fullName }) : formatMessage(messages.fallbackLabel); }; var messages = (0, _reactIntlNext.defineMessages)({ fallbackLabel: { id: 'profilecard.user.trigger.fallback-aria-label', defaultMessage: 'More information about this user', description: 'Label for profile card trigger when we do not have user name' }, label: { id: 'profilecard.user.trigger.aria-label', defaultMessage: 'More information about {fullName}', description: 'Label for profile card trigger' } }); var _default = exports.default = getLabelMessage;