@atlaskit/global-search
Version:
A cross-product search component (batteries included)
55 lines (42 loc) • 3.51 kB
JavaScript
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _inherits from "@babel/runtime/helpers/inherits";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
import React from 'react';
import { FormattedMessage } from 'react-intl';
import styled from 'styled-components'; // AFP-2532 TODO: Fix automatic suppressions below
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
import { gridSize, typography } from '@atlaskit/theme';
import { messages } from '../messages';
import MaginfyingGlassImage from '../assets/MagnifyingGlassImage';
var Wrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n margin: ", "px 0;\n"])), gridSize() * 4);
var ImageWrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 20%;\n height: 20%;\n margin-top: ", "px;\n"])), gridSize() * 11);
var TextWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n margin-top: ", "px;\n"])), gridSize() * 3);
var Title = styled.h4(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", ";\n margin-bottom: ", "px;\n margin-top: 0;\n"])), typography.h600(), gridSize() * 2);
var Text = function Text(_ref) {
var children = _ref.children;
return /*#__PURE__*/React.createElement(TextWrapper, null, /*#__PURE__*/React.createElement(Title, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.no_recent_activity_title)), children);
};
var NoRecentActivity = /*#__PURE__*/function (_React$Component) {
_inherits(NoRecentActivity, _React$Component);
var _super = _createSuper(NoRecentActivity);
function NoRecentActivity() {
_classCallCheck(this, NoRecentActivity);
return _super.apply(this, arguments);
}
_createClass(NoRecentActivity, [{
key: "render",
value: function render() {
return /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(ImageWrapper, null, /*#__PURE__*/React.createElement(MaginfyingGlassImage, null)), /*#__PURE__*/React.createElement(Text, {
children: this.props.children
}));
}
}]);
return NoRecentActivity;
}(React.Component);
export { NoRecentActivity as default };