UNPKG

@activecollab/components

Version:

ActiveCollab Components

31 lines (29 loc) 1.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TwoFactorShield = void 0; var _react = _interopRequireDefault(require("react")); var _Icons = require("../../components/Icons"); var _Tooltip = require("../../components/Tooltip"); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } /* Two-factor-authentication shield — the same indicator as the app's `User2FA` (ShieldIcon + Tooltip). Shared by the Users list and the User profile so the icon and its tooltip stay identical in one place. The shield uses its default muted `--color-theme-600` fill. */ var TwoFactorShield = exports.TwoFactorShield = function TwoFactorShield(_ref) { var _ref$needsSetup = _ref.needsSetup, needsSetup = _ref$needsSetup === void 0 ? false : _ref$needsSetup, className = _ref.className; return /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, { title: needsSetup ? "Enable two-factor authentication" : "Two-factor authentication enabled" }, /*#__PURE__*/_react.default.createElement(_Icons.ShieldIcon, { className: className, style: needsSetup ? { opacity: 0.5, cursor: "pointer" } : undefined })); }; TwoFactorShield.displayName = "TwoFactorShield"; //# sourceMappingURL=TwoFactorShield.js.map