cometchat-react-ui-kit2
Version:
CometChat UI Kit for React App
69 lines (68 loc) • 3.33 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.dataItemThumbnailStyle = exports.dataItemSubtitleStyle = exports.dataItemStyle = exports.dataItemNameStyle = exports.dataItemDetailStyle = void 0;
var _Shared = require("../../../Shared");
var dataItemStyle = function dataItemStyle(style, theme, isActive) {
var _theme$palette;
return {
display: "flex",
flexDirection: "row",
justifyContent: "left",
alignItems: "center",
cursor: "pointer",
width: style === null || style === void 0 ? void 0 : style.width,
height: style === null || style === void 0 ? void 0 : style.height,
borderRadius: style === null || style === void 0 ? void 0 : style.borderRadius,
padding: "0 16px",
background: isActive ? style === null || style === void 0 ? void 0 : style.activeBackground : (style === null || style === void 0 ? void 0 : style.background) || (theme === null || theme === void 0 ? void 0 : (_theme$palette = theme.palette) === null || _theme$palette === void 0 ? void 0 : _theme$palette.getBackground())
};
};
exports.dataItemStyle = dataItemStyle;
var dataItemThumbnailStyle = function dataItemThumbnailStyle() {
return {
display: "flex",
position: "relative",
flexShrink: "0",
justifyContent: "center",
alignItems: "center",
padding: "8px 0px"
};
};
exports.dataItemThumbnailStyle = dataItemThumbnailStyle;
var dataItemDetailStyle = function dataItemDetailStyle(style, theme) {
return {
borderBottom: style === null || style === void 0 ? void 0 : style.border,
width: "100%",
marginLeft: "16px",
padding: "8px 0px"
};
};
exports.dataItemDetailStyle = dataItemDetailStyle;
var dataItemNameStyle = function dataItemNameStyle(style, theme) {
var _theme$typography, _theme$palette2;
return {
font: (style === null || style === void 0 ? void 0 : style.titleFont) || (0, _Shared.fontHelper)(theme === null || theme === void 0 ? void 0 : (_theme$typography = theme.typography) === null || _theme$typography === void 0 ? void 0 : _theme$typography.title2),
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
width: "100%",
lineHeight: "22px",
color: (style === null || style === void 0 ? void 0 : style.titleColor) || (theme === null || theme === void 0 ? void 0 : (_theme$palette2 = theme.palette) === null || _theme$palette2 === void 0 ? void 0 : _theme$palette2.getAccent())
};
};
exports.dataItemNameStyle = dataItemNameStyle;
var dataItemSubtitleStyle = function dataItemSubtitleStyle(style, theme) {
var _theme$typography2, _theme$palette3;
return {
font: (style === null || style === void 0 ? void 0 : style.subtitleFont) || (0, _Shared.fontHelper)(theme === null || theme === void 0 ? void 0 : (_theme$typography2 = theme.typography) === null || _theme$typography2 === void 0 ? void 0 : _theme$typography2.subtitle2),
color: (style === null || style === void 0 ? void 0 : style.subtitleColor) || (theme === null || theme === void 0 ? void 0 : (_theme$palette3 = theme.palette) === null || _theme$palette3 === void 0 ? void 0 : _theme$palette3.getAccent600()),
display: "flex",
justifyContent: "left",
alignItems: "center",
width: "100%",
letterSpacing: -1
};
};
exports.dataItemSubtitleStyle = dataItemSubtitleStyle;