UNPKG

@atlaskit/editor-common

Version:

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

59 lines 2.06 kB
/** @jsx jsx */ import { css, jsx } from '@emotion/react'; import { FormattedMessage } from 'react-intl-next'; import Button from '@atlaskit/button'; import { Box, xcss } from '@atlaskit/primitives'; import NotFoundIllustration from './NotFoundIllustration'; export default function EmptyState(_ref) { var onExternalLinkClick = _ref.onExternalLinkClick; return jsx("div", { css: emptyStateWrapper, "data-testid": "empty-state-wrapper" }, jsx(NotFoundIllustration, null), jsx("div", { css: emptyStateHeading }, jsx(FormattedMessage, { id: "fabric.editor.elementbrowser.search.empty-state.heading", defaultMessage: "Nothing matches your search", description: "Empty state heading" })), jsx("div", { css: emptyStateSubHeading }, jsx("p", null, jsx(FormattedMessage, { id: "fabric.editor.elementbrowser.search.empty-state.sub-heading", defaultMessage: "Try searching with a different term or discover new apps for Atlassian products.", description: "Empty state sub-heading" })), jsx(Box, { xcss: externalLinkWrapper }, jsx(Button, { appearance: "primary", target: "_blank", href: "https://marketplace.atlassian.com/search?category=Macros&hosting=cloud&product=confluence", onClick: onExternalLinkClick }, jsx(FormattedMessage, { id: "fabric.editor.elementbrowser.search.empty-state.sub-heading.link", defaultMessage: "Explore Atlassian Marketplace", description: "Empty state sub-heading external link" }))))); } var emptyStateHeading = css({ fontSize: '1.42857em', lineHeight: 1.2, color: "var(--ds-text, rgb(23, 43, 77))", fontWeight: 500, letterSpacing: '-0.008em', marginTop: "var(--ds-space-300, 24px)" }); var emptyStateSubHeading = css({ marginTop: "var(--ds-space-200, 16px)", maxWidth: '400px', textAlign: 'center' }); var emptyStateWrapper = css({ display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', width: '100%' }); var externalLinkWrapper = xcss({ marginTop: "var(--ds-space-150, 12px)" });