UNPKG

cometchat-react-ui-kit2

Version:

CometChat UI Kit for React App

91 lines (90 loc) 5.34 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.MessageComposerStyles = 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 _Shared = require("../../Shared"); 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 MessageComposerStyles * @param {String} inputBorderRadius * @param {String} inputBackground * @param {String} inputTextFont * @param {String} inputTextColor * @param {String} placeholderTextFont * @param {String} placeholderTextColor * @param {String} emojiIconTint * @param {String} attachmentIconTint * @param {String} stickerIconTint * @param {String} stickerCloseIconTint */var MessageComposerStyles = /*#__PURE__*/function (_BaseStyles) { (0, _inherits2["default"])(MessageComposerStyles, _BaseStyles); var _super = _createSuper(MessageComposerStyles); function MessageComposerStyles(_ref) { var _this; var _ref$inputBorderRadiu = _ref.inputBorderRadius, inputBorderRadius = _ref$inputBorderRadiu === void 0 ? "" : _ref$inputBorderRadiu, _ref$inputBackground = _ref.inputBackground, inputBackground = _ref$inputBackground === void 0 ? "" : _ref$inputBackground, _ref$inputTextFont = _ref.inputTextFont, inputTextFont = _ref$inputTextFont === void 0 ? "" : _ref$inputTextFont, _ref$inputTextColor = _ref.inputTextColor, inputTextColor = _ref$inputTextColor === void 0 ? "" : _ref$inputTextColor, _ref$placeholderTextF = _ref.placeholderTextFont, placeholderTextFont = _ref$placeholderTextF === void 0 ? "" : _ref$placeholderTextF, _ref$placeholderTextC = _ref.placeholderTextColor, placeholderTextColor = _ref$placeholderTextC === void 0 ? "" : _ref$placeholderTextC, _ref$emojiIconTint = _ref.emojiIconTint, emojiIconTint = _ref$emojiIconTint === void 0 ? "" : _ref$emojiIconTint, _ref$attachmentIconTi = _ref.attachmentIconTint, attachmentIconTint = _ref$attachmentIconTi === void 0 ? "" : _ref$attachmentIconTi, _ref$stickerIconTint = _ref.stickerIconTint, stickerIconTint = _ref$stickerIconTint === void 0 ? "" : _ref$stickerIconTint, _ref$stickerCloseIcon = _ref.stickerCloseIconTint, stickerCloseIconTint = _ref$stickerCloseIcon === void 0 ? "" : _ref$stickerCloseIcon, _ref$sendButtonIconTi = _ref.sendButtonIconTint, sendButtonIconTint = _ref$sendButtonIconTi === void 0 ? "" : _ref$sendButtonIconTi, _ref$width = _ref.width, width = _ref$width === void 0 ? "100%" : _ref$width, _ref$height = _ref.height, height = _ref$height === void 0 ? "100%" : _ref$height, _ref$border = _ref.border, border = _ref$border === void 0 ? "none" : _ref$border, _ref$borderRadius = _ref.borderRadius, borderRadius = _ref$borderRadius === void 0 ? "12px" : _ref$borderRadius, _ref$background = _ref.background, background = _ref$background === void 0 ? "" : _ref$background, _ref$activeBackground = _ref.activeBackground, activeBackground = _ref$activeBackground === void 0 ? "" : _ref$activeBackground; (0, _classCallCheck2["default"])(this, MessageComposerStyles); _this = _super.call(this, { width: width, height: height, background: background, activeBackground: activeBackground, border: border, borderRadius: borderRadius }); _this.inputBorderRadius = inputBorderRadius; _this.inputBackground = inputBackground; _this.inputTextFont = inputTextFont; _this.inputTextColor = inputTextColor; _this.placeholderTextFont = placeholderTextFont; _this.placeholderTextColor = placeholderTextColor; _this.emojiIconTint = emojiIconTint; _this.attachmentIconTint = attachmentIconTint; _this.stickerIconTint = stickerIconTint; _this.stickerCloseIconTint = stickerCloseIconTint; _this.sendButtonIconTint = sendButtonIconTint; return _this; } return (0, _createClass2["default"])(MessageComposerStyles); }(_Shared.BaseStyles); exports.MessageComposerStyles = MessageComposerStyles;