cometchat-react-ui-kit2
Version:
CometChat UI Kit for React App
71 lines (70 loc) • 2.44 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.textStyle = exports.imgStyle = exports.getOuterViewStyle = exports.getImageStyle = exports.getContainerStyle = void 0;
var imgStyle = function imgStyle() {
return {
overflow: "hidden",
display: "inherit",
width: "100%",
height: "100%"
};
};
exports.imgStyle = imgStyle;
var getImageStyle = function getImageStyle(style, imageURL) {
return {
display: "flex",
width: "100%",
height: "100%",
flex: "1 1 100%",
backgroundPosition: "center",
backgroundRepeat: "no-repeat",
backgroundSize: style === null || style === void 0 ? void 0 : style.backgroundSize,
backgroundImage: "url(".concat(imageURL, ")"),
borderRadius: style === null || style === void 0 ? void 0 : style.borderRadius
};
};
exports.getImageStyle = getImageStyle;
var getContainerStyle = function getContainerStyle(style) {
return {
height: style === null || style === void 0 ? void 0 : style.height,
width: style === null || style === void 0 ? void 0 : style.width,
borderRadius: style === null || style === void 0 ? void 0 : style.borderRadius,
margin: style === null || style === void 0 ? void 0 : style.outerViewSpacing,
border: style === null || style === void 0 ? void 0 : style.border,
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "stretch",
backgroundColor: style === null || style === void 0 ? void 0 : style.backgroundColor,
boxSizing: "content-box",
cursor: "inherit",
outline: "none",
overflow: "hidden",
position: "static",
padding: "0"
};
};
exports.getContainerStyle = getContainerStyle;
var getOuterViewStyle = function getOuterViewStyle(style) {
return {
borderRadius: style === null || style === void 0 ? void 0 : style.borderRadius,
border: style === null || style === void 0 ? void 0 : style.outerView,
margin: "0",
padding: "0"
};
};
exports.getOuterViewStyle = getOuterViewStyle;
var textStyle = function textStyle(style) {
return {
height: "100%",
width: "100%",
font: style === null || style === void 0 ? void 0 : style.textFont,
color: style === null || style === void 0 ? void 0 : style.textColor,
textAlign: 'center',
textAlignVertical: 'center',
lineHeight: style === null || style === void 0 ? void 0 : style.height
};
};
exports.textStyle = textStyle;