cometchat-react-ui-kit2
Version:
CometChat UI Kit for React App
95 lines (94 loc) • 4.87 kB
JavaScript
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.UsersStyles = 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 UsersStyle
* @description Styling component for Users
* @param {number} height
* @param {number} width
* @param {object} border
* @param {number} borderRadius
* @param {string} backgroundColor
* @param {object} titleFont
* @param {string} titleColor
* @param {string} backIconTint
* @param {object} searchBorder
* @param {number} searchBorderRadius
* @param {string} searchBackground
* @param {object} searchTextFont
* @param {string} searchTextColor
* @param {string} searchIconTint
*/var UsersStyles = /*#__PURE__*/function (_BaseStyles) {
(0, _inherits2["default"])(UsersStyles, _BaseStyles);
var _super = _createSuper(UsersStyles);
function UsersStyles(_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$backgroundColor = _ref.backgroundColor,
backgroundColor = _ref$backgroundColor === void 0 ? "" : _ref$backgroundColor,
_ref$border = _ref.border,
border = _ref$border === void 0 ? {
borderWidth: 0,
borderColor: "transparent",
borderStyle: "solid"
} : _ref$border,
_ref$borderRadius = _ref.borderRadius,
borderRadius = _ref$borderRadius === void 0 ? 0 : _ref$borderRadius,
_ref$titleFont = _ref.titleFont,
titleFont = _ref$titleFont === void 0 ? "" : _ref$titleFont,
_ref$titleColor = _ref.titleColor,
titleColor = _ref$titleColor === void 0 ? "" : _ref$titleColor,
_ref$backIconTint = _ref.backIconTint,
backIconTint = _ref$backIconTint === void 0 ? "" : _ref$backIconTint,
_ref$searchBorder = _ref.searchBorder,
searchBorder = _ref$searchBorder === void 0 ? {
borderWidth: 1,
borderColor: "#141414",
borderStyle: "solid"
} : _ref$searchBorder,
_ref$searchBorderRadi = _ref.searchBorderRadius,
searchBorderRadius = _ref$searchBorderRadi === void 0 ? 8 : _ref$searchBorderRadi,
_ref$searchBackground = _ref.searchBackground,
searchBackground = _ref$searchBackground === void 0 ? "" : _ref$searchBackground,
_ref$searchTextFont = _ref.searchTextFont,
searchTextFont = _ref$searchTextFont === void 0 ? "" : _ref$searchTextFont,
_ref$searchTextColor = _ref.searchTextColor,
searchTextColor = _ref$searchTextColor === void 0 ? "" : _ref$searchTextColor,
_ref$searchIconTint = _ref.searchIconTint,
searchIconTint = _ref$searchIconTint === void 0 ? "" : _ref$searchIconTint;
(0, _classCallCheck2["default"])(this, UsersStyles);
_this = _super.call(this, {
height: height,
width: width,
border: border,
borderRadius: borderRadius,
backgroundColor: backgroundColor
});
_this.titleFont = titleFont;
_this.titleColor = titleColor;
_this.backIconTint = backIconTint;
_this.searchBorder = searchBorder;
_this.searchBackground = searchBackground;
_this.searchBorderRadius = searchBorderRadius;
_this.searchTextFont = searchTextFont;
_this.searchTextColor = searchTextColor;
_this.searchIconTint = searchIconTint;
return _this;
}
return (0, _createClass2["default"])(UsersStyles);
}(_Shared.BaseStyles);
exports.UsersStyles = UsersStyles;