@lykkex/react-components
Advanced tools
Comparing version 0.5.3 to 0.5.4
@@ -10,2 +10,3 @@ /// <reference types="react" /> | ||
email?: string; | ||
onLogout: () => void; | ||
activeMenuItem?: MenuItem | string; | ||
@@ -12,0 +13,0 @@ } |
@@ -67,3 +67,3 @@ var __extends = (this && this.__extends) || (function () { | ||
React.createElement(DropdownContainer, null, | ||
React.createElement(UserMenu, { userName: userName, email: email }))) | ||
React.createElement(UserMenu, { userName: userName, email: email, onLogout: this.props.onLogout }))) | ||
: | ||
@@ -70,0 +70,0 @@ React.createElement("a", { href: "http://lykke.com/site/signin", className: "btn btn-primary" }, "Get started")))), |
@@ -7,4 +7,5 @@ /// <reference types="react" /> | ||
className?: string; | ||
onLogout: () => void; | ||
} | ||
export declare const UserMenu: React.SFC<UserMenuProps>; | ||
export default UserMenu; |
@@ -21,6 +21,10 @@ var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
export var UserMenu = function (_a) { | ||
var userName = _a.userName, email = _a.email, className = _a.className, attributes = __rest(_a, ["userName", "email", "className"]); | ||
var userName = _a.userName, email = _a.email, onLogout = _a.onLogout, className = _a.className, attributes = __rest(_a, ["userName", "email", "onLogout", "className"]); | ||
var handleLogoutClick = function (e) { | ||
e.preventDefault(); | ||
onLogout(); | ||
}; | ||
return (React.createElement("div", __assign({}, attributes, { className: classnames('user-menu', className) }), | ||
React.createElement("div", { className: "user-menu__actions" }, | ||
React.createElement("a", { className: "user-menu__sign-out", href: "https://auth.lykke.com/connect/logout?post_logout_redirect_uri=https://lykke.com" })), | ||
React.createElement("a", { className: "user-menu__sign-out", href: "#", onClick: handleLogoutClick })), | ||
React.createElement("div", { className: "user-menu__icon" }), | ||
@@ -27,0 +31,0 @@ React.createElement("div", { className: "user-menu__name" }, userName), |
{ | ||
"name": "@lykkex/react-components", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"description": "React Components for Lykke projects", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10454258
65053