UNPKG

cometchat-react-ui-kit2

Version:

CometChat UI Kit for React App

71 lines (70 loc) 3.58 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.previewWrapperStyle = exports.previewOptionsWrapperStyle = exports.previewOptionStyle = exports.previewHeadingStyle = exports.previewCloseStyle = void 0; var _Shared = require("../../Shared"); var previewWrapperStyle = function previewWrapperStyle(style, theme) { var _theme$palette, _theme$palette2; return { padding: "8px 8px 16px 8px", width: "100%", marginBottom: "-8px", background: style.background || (theme === null || theme === void 0 ? void 0 : (_theme$palette = theme.palette) === null || _theme$palette === void 0 ? void 0 : _theme$palette.background[theme === null || theme === void 0 ? void 0 : (_theme$palette2 = theme.palette) === null || _theme$palette2 === void 0 ? void 0 : _theme$palette2.mode]), fontSize: "13px", display: "flex", flexDirection: "row-reverse", justifyContent: "flex-end", alignItems: "center", position: "absolute", bottom: "0px", zIndex: "2" }; }; exports.previewWrapperStyle = previewWrapperStyle; var previewHeadingStyle = function previewHeadingStyle() { return { alignSelf: "flex-start", display: "flex", alignItems: "baseline", justifyContent: "space-between" }; }; exports.previewHeadingStyle = previewHeadingStyle; var previewCloseStyle = function previewCloseStyle(style, img, theme) { var _theme$palette3, _theme$palette4; return { width: "24px", height: "24px", borderRadius: "50%", padding: "25px", WebkitMask: "url(".concat(img, ") center center no-repeat"), background: style.iconTint || (theme === null || theme === void 0 ? void 0 : (_theme$palette3 = theme.palette) === null || _theme$palette3 === void 0 ? void 0 : _theme$palette3.accent600[theme === null || theme === void 0 ? void 0 : (_theme$palette4 = theme.palette) === null || _theme$palette4 === void 0 ? void 0 : _theme$palette4.mode]), cursor: "pointer" }; }; exports.previewCloseStyle = previewCloseStyle; var previewOptionsWrapperStyle = function previewOptionsWrapperStyle() { return { display: "flex", alignItems: "center", width: "fit-content" }; }; exports.previewOptionsWrapperStyle = previewOptionsWrapperStyle; var previewOptionStyle = function previewOptionStyle(style, theme) { var _theme$palette5, _theme$palette6, _theme$typography, _theme$palette7, _theme$palette8; return { padding: "5px", margin: "0 4px", boxShadow: "0px 0px 0px 1px #f2eeee", background: style.textBackground || (theme === null || theme === void 0 ? void 0 : (_theme$palette5 = theme.palette) === null || _theme$palette5 === void 0 ? void 0 : _theme$palette5.background[theme === null || theme === void 0 ? void 0 : (_theme$palette6 = theme.palette) === null || _theme$palette6 === void 0 ? void 0 : _theme$palette6.mode]), border: "1px solid #eaeaea", textFont: style.textFont || (0, _Shared.fontHelper)(theme === null || theme === void 0 ? void 0 : (_theme$typography = theme.typography) === null || _theme$typography === void 0 ? void 0 : _theme$typography.subtitle2), textColor: style.textColor || (theme === null || theme === void 0 ? void 0 : (_theme$palette7 = theme.palette) === null || _theme$palette7 === void 0 ? void 0 : _theme$palette7.accent[theme === null || theme === void 0 ? void 0 : (_theme$palette8 = theme.palette) === null || _theme$palette8 === void 0 ? void 0 : _theme$palette8.mode]), borderRadius: "18px", cursor: "pointer", textAlign: "center" }; }; exports.previewOptionStyle = previewOptionStyle;