UNPKG

cometchat-react-ui-kit2

Version:

CometChat UI Kit for React App

87 lines (86 loc) 5.05 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.ConversationListItemStyles = void 0; var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); var _BaseStyles2 = require("../../Base/BaseStyles"); function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(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; } } /** * @class ConversationListItemStyles * @description ConversationListItemStyles class is used for defining the styles for conversation list item. * @param {String} width * @param {String} height * @param {String} background * @param {String} activeBackground * @param {String} border * @param {String} borderRadius * @param {String} titleColor * @param {String} titleFont * @param {String} subtitleColor * @param {String} subtitleFont * @param {String} typingIndicatorTextColor * @param {String} typingIndicatorTextFont * @param {String} threadIndicatorTextColor * @param {String} threadIndicatorTextFont */var ConversationListItemStyles = /*#__PURE__*/function (_BaseStyles) { (0, _inherits2["default"])(ConversationListItemStyles, _BaseStyles); var _super = _createSuper(ConversationListItemStyles); function ConversationListItemStyles(_ref) { var _this; var _ref$width = _ref.width, width = _ref$width === void 0 ? "280px" : _ref$width, _ref$height = _ref.height, height = _ref$height === void 0 ? "100%" : _ref$height, _ref$background = _ref.background, background = _ref$background === void 0 ? "" : _ref$background, _ref$activeBackground = _ref.activeBackground, activeBackground = _ref$activeBackground === void 0 ? "" : _ref$activeBackground, _ref$border = _ref.border, border = _ref$border === void 0 ? "" : _ref$border, _ref$borderRadius = _ref.borderRadius, borderRadius = _ref$borderRadius === void 0 ? "50%" : _ref$borderRadius, _ref$titleColor = _ref.titleColor, titleColor = _ref$titleColor === void 0 ? "" : _ref$titleColor, _ref$titleFont = _ref.titleFont, titleFont = _ref$titleFont === void 0 ? "" : _ref$titleFont, _ref$subtitleColor = _ref.subtitleColor, subtitleColor = _ref$subtitleColor === void 0 ? "" : _ref$subtitleColor, _ref$subtitleFont = _ref.subtitleFont, subtitleFont = _ref$subtitleFont === void 0 ? "" : _ref$subtitleFont, _ref$typingIndicatorT = _ref.typingIndicatorTextColor, typingIndicatorTextColor = _ref$typingIndicatorT === void 0 ? "" : _ref$typingIndicatorT, _ref$typingIndicatorT2 = _ref.typingIndicatorTextFont, typingIndicatorTextFont = _ref$typingIndicatorT2 === void 0 ? "" : _ref$typingIndicatorT2, _ref$threadIndicatorT = _ref.threadIndicatorTextColor, threadIndicatorTextColor = _ref$threadIndicatorT === void 0 ? "" : _ref$threadIndicatorT, _ref$threadIndicatorT2 = _ref.threadIndicatorTextFont, threadIndicatorTextFont = _ref$threadIndicatorT2 === void 0 ? "" : _ref$threadIndicatorT2; (0, _classCallCheck2["default"])(this, ConversationListItemStyles); _this = _super.call(this, { width: width, height: height, background: background, activeBackground: activeBackground, border: border, borderRadius: borderRadius }); _this.titleColor = titleColor; _this.titleFont = titleFont; _this.subtitleColor = subtitleColor; _this.subtitleFont = subtitleFont; _this.typingIndicatorTextColor = typingIndicatorTextColor; _this.typingIndicatorTextFont = typingIndicatorTextFont; _this.threadIndicatorTextColor = threadIndicatorTextColor; _this.threadIndicatorTextFont = threadIndicatorTextFont; return _this; } return (0, _createClass2["default"])(ConversationListItemStyles); }(_BaseStyles2.BaseStyles); exports.ConversationListItemStyles = ConversationListItemStyles;