@fluentui/react-northstar
Version:
A themable React component library.
39 lines (38 loc) • 1.46 kB
JavaScript
import { defaultChatDensity } from '../../../../components/Chat/chatDensity';
import { chatItemStylesComfy } from './chatItemStylesComfy';
import { chatItemStylesCompact } from './chatItemStylesCompact';
var chatItemDensityStyles = {
comfy: chatItemStylesComfy,
compact: chatItemStylesCompact
};
var getChatItemDensityStyles = function getChatItemDensityStyles(density) {
if (density === void 0) {
density = defaultChatDensity;
}
return chatItemDensityStyles[density];
};
export 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));
}
};
//# sourceMappingURL=chatItemStyles.js.map