UNPKG

@atlaskit/editor-common

Version:

A package that contains common classes and components for editor and renderer

31 lines (30 loc) 903 B
/** * @jsxRuntime classic * @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766 import { jsx } from '@emotion/react'; import WarningIcon from '@atlaskit/icon/glyph/warning'; import Tooltip from '@atlaskit/tooltip'; import { ICON_SIZE_THRESOLD } from './constants'; import { Frame } from './frame'; import { IconWrapper } from './icon-wrapper'; export const InlineImageCardErrorView = ({ testId = 'media-inline-image-card-error-view', message, icon, height = ICON_SIZE_THRESOLD }) => { return jsx(Frame, { testId: testId }, jsx(Tooltip, { content: message, position: "top", tag: "span", hideTooltipOnClick: true }, jsx(IconWrapper, null, icon || jsx(WarningIcon, { label: "error", size: height > ICON_SIZE_THRESOLD ? 'medium' : 'small', primaryColor: "var(--ds-icon-danger, #C9372C)" })))); };