@fluentui/react-northstar
Version:
A themable React component library.
44 lines (42 loc) • 1.62 kB
JavaScript
exports.__esModule = true;
exports.chatItemStyles = void 0;
var _chatDensity = require("../../../../components/Chat/chatDensity");
var _chatItemStylesComfy = require("./chatItemStylesComfy");
var _chatItemStylesCompact = require("./chatItemStylesCompact");
var chatItemDensityStyles = {
comfy: _chatItemStylesComfy.chatItemStylesComfy,
compact: _chatItemStylesCompact.chatItemStylesCompact
};
var getChatItemDensityStyles = function getChatItemDensityStyles(density) {
if (density === void 0) {
density = _chatDensity.defaultChatDensity;
}
return chatItemDensityStyles[density];
};
var chatItemStyles = {
root: function root(componentStyleFunctionParam) {
var p = componentStyleFunctionParam.props;
return Object.assign({
paddingBottom: 0,
position: 'relative'
}, getChatItemDensityStyles(p.density).root(componentStyleFunctionParam));
},
gutter: function gutter(componentStyleFunctionParam) {
var p = componentStyleFunctionParam.props;
return Object.assign({
position: 'absolute'
}, (p.attached === 'bottom' || p.attached === true) && {
display: 'none'
}, getChatItemDensityStyles(p.density).gutter(componentStyleFunctionParam));
},
message: function message(componentStyleFunctionParam) {
var p = componentStyleFunctionParam.props;
return Object.assign({
float: p.contentPosition === 'end' ? 'right' : 'left',
position: 'relative'
}, getChatItemDensityStyles(p.density).message(componentStyleFunctionParam));
}
};
exports.chatItemStyles = chatItemStyles;
//# sourceMappingURL=chatItemStyles.js.map
;