UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

53 lines (52 loc) 2.24 kB
/* index-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */ import _extends from "@babel/runtime/helpers/extends"; import "./index-compiled.compiled.css"; import * as React from 'react'; import { ax, ix } from "@compiled/react/runtime"; /** * Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment. * Used via `componentWithCondition` in `index.tsx`. * * Cleanup: delete this file once the `platform_editor_core_non_ecc_static_css` experiment has shipped. */ import { akEditorContextPanelWidth, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles'; const ANIM_SPEED_MS = 500; const panelStyles = { panel: "_v5648l2w _1reo15vq _18m915vq _1bsbnklw _4t3i1osq _16qshh4h", panelHidden: "_1bsbidpf", disablePanelAnimation: "_v564glyw", content: "_v564e1q5 _vchhusvi _1bsbnklw _4t3i1osq _18m91wug", padding: "_ca0qpxbi _u5f3pxbi _n3tdze3t _19bvpxbi", customWidthOverflow: "_1reo15vq" }; export const ContextPanelWrapperCompiled = ({ children, customWidth, visible, disableAnimation, ...rest }) => /*#__PURE__*/React.createElement("div", _extends({ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- dynamic width cannot be expressed as static compiled CSS style: customWidth && visible ? { width: `${customWidth}px` } : undefined // eslint-disable-next-line react/jsx-props-no-spreading }, rest, { className: ax([panelStyles.panel, customWidth && "", !visible && panelStyles.panelHidden, disableAnimation && panelStyles.disablePanelAnimation]) }), children); export const ContextPanelContentCompiled = ({ children, customWidth, visible, disableAnimation, hasPadding, ...rest }) => /*#__PURE__*/React.createElement("div", _extends({ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- dynamic width cannot be expressed as static compiled CSS style: customWidth && visible ? { width: `${customWidth}px` } : undefined // eslint-disable-next-line react/jsx-props-no-spreading }, rest, { className: ax([panelStyles.content, hasPadding && panelStyles.padding, customWidth && "", !visible && panelStyles.panelHidden, disableAnimation && panelStyles.disablePanelAnimation]) }), children);