@elastic/eui
Version:
Elastic UI Component Library
51 lines (50 loc) • 3.08 kB
JavaScript
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { css } from '@emotion/react';
import { logicalCSS, logicalSizeCSS, mathWithUnits, euiMaxBreakpoint } from '../../../global_styling';
import { euiHeaderVariables } from '../header.styles';
var _ref = process.env.NODE_ENV === "production" ? {
name: "k09eot-euiHeaderSectionItemButton__notification",
styles: "position:absolute;label:euiHeaderSectionItemButton__notification;"
} : {
name: "k09eot-euiHeaderSectionItemButton__notification",
styles: "position:absolute;label:euiHeaderSectionItemButton__notification;",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
var _ref2 = process.env.NODE_ENV === "production" ? {
name: "1f67s81-euiHeaderSectionItemButton__content",
styles: "display:inline-block;label:euiHeaderSectionItemButton__content;"
} : {
name: "1f67s81-euiHeaderSectionItemButton__content",
styles: "display:inline-block;label:euiHeaderSectionItemButton__content;",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
export var euiHeaderSectionItemButtonStyles = function euiHeaderSectionItemButtonStyles(euiThemeContext) {
var _euiHeaderVariables = euiHeaderVariables(euiThemeContext),
childHeight = _euiHeaderVariables.childHeight;
var euiTheme = euiThemeContext.euiTheme;
var dotSize = euiTheme.size.base;
var dotOffset = mathWithUnits(dotSize, function (x) {
return x * -0.5;
});
var badgeOffset = mathWithUnits(euiTheme.size.s, function (x) {
return x * -0.5;
});
return {
euiHeaderSectionItemButton: /*#__PURE__*/css("position:relative;", logicalCSS('height', childHeight), " ", logicalCSS('min-width', childHeight), " ", logicalCSS('padding-horizontal', euiTheme.size.s), " text-align:center;font-size:0;", euiMaxBreakpoint(euiThemeContext, 's'), "{", logicalCSS('min-width', mathWithUnits(childHeight, function (x) {
return x * 0.75;
})), ";};label:euiHeaderSectionItemButton;"),
euiHeaderSectionItemButton__content: _ref2,
notification: {
euiHeaderSectionItemButton__notification: _ref,
dot: /*#__PURE__*/css(logicalCSS('top', 0), " ", logicalCSS('right', dotOffset), " stroke:", euiTheme.colors.emptyShade, ";", euiMaxBreakpoint(euiThemeContext, 's'), "{", logicalSizeCSS(dotSize), " ", logicalCSS('top', '9%'), ";};label:dot;"),
badge: /*#__PURE__*/css(logicalCSS('top', '9%'), " ", logicalCSS('right', badgeOffset), " box-shadow:0 0 0 ", euiTheme.border.width.thin, " ", euiTheme.colors.emptyShade, ";;label:badge;")
}
};
};