@atlaskit/navigation-system
Version:
The latest navigation system for Atlassian apps.
26 lines • 832 B
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["src"];
import React, { forwardRef, useCallback } from 'react';
import Avatar from '@atlaskit/avatar/avatar';
import { EndItem } from './end-item';
/**
* __Profile__
*
* The Profile button for the top navigation.
*/
export var Profile = /*#__PURE__*/forwardRef(function (_ref, ref) {
var src = _ref.src,
props = _objectWithoutProperties(_ref, _excluded);
var ProfileAvatar = useCallback(function () {
return /*#__PURE__*/React.createElement(Avatar, {
appearance: "circle",
src: src,
size: "small"
});
}, [src]);
return /*#__PURE__*/React.createElement(EndItem, _extends({}, props, {
ref: ref,
icon: ProfileAvatar
}));
});