@elastic/eui
Version:
Elastic UI Component Library
40 lines (39 loc) • 2.38 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.
*/
/*
* 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 { euiPaddingSize } from '../../global_styling';
import { euiCodeSyntaxVariables } from './code_syntax.styles';
var _ref = process.env.NODE_ENV === "production" ? {
name: "to86kv-none",
styles: "inset-block-start:0;inset-inline-end:0;label:none;"
} : {
name: "to86kv-none",
styles: "inset-block-start:0;inset-inline-end:0;label:none;",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
export var euiCodeBlockControlsStyles = function euiCodeBlockControlsStyles(euiThemeContext) {
var euiTheme = euiThemeContext.euiTheme;
var codeSyntaxVariables = euiCodeSyntaxVariables(euiThemeContext);
return {
euiCodeBlock__controls: /*#__PURE__*/css("position:absolute;display:flex;flex-direction:column;gap:", euiTheme.size.xs, ";background:", codeSyntaxVariables.backgroundColor, ";;label:euiCodeBlock__controls;"),
offset: {
none: _ref,
s: /*#__PURE__*/css("inset-block-start:", euiPaddingSize(euiThemeContext, 's'), ";inset-inline-end:", euiPaddingSize(euiThemeContext, 's'), ";;label:s;"),
m: /*#__PURE__*/css("inset-block-start:", euiPaddingSize(euiThemeContext, 'm'), ";inset-inline-end:", euiPaddingSize(euiThemeContext, 'm'), ";;label:m;"),
l: /*#__PURE__*/css("inset-block-start:", euiPaddingSize(euiThemeContext, 'l'), ";inset-inline-end:", euiPaddingSize(euiThemeContext, 'l'), ";;label:l;")
}
};
};