UNPKG

@atlaskit/comment

Version:

A comment displays discussions and user feedback.

47 lines • 1.43 kB
/* footer.tsx generated by @compiled/babel-plugin v3.0.2 */ import "./footer.compiled.css"; import { ax, ix } from "@compiled/react/runtime"; import React from 'react'; import WarningIcon from '@atlaskit/icon/core/status-warning'; import { Flex } from '@atlaskit/primitives/compiled'; // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- TODO: migrate to @atlaskit/primitives/compiled import Inline from '@atlaskit/primitives/inline'; const iconSpacingStyles = { space050: "_1rjc1b66 _18zr1b66" }; /** * __Footer items__ * * The footer items in the comment. Usually reserved for error messages. * * @internal */ const Footer = ({ actions = [], errorActions = [], errorIconLabel, isError, isSaving, testId }) => { if (isSaving || !(actions.length || errorActions.length)) { return null; } const items = isError ? errorActions : actions; return /*#__PURE__*/React.createElement(Inline, { alignBlock: "center", shouldWrap: true, testId: testId, space: "space.100", separator: "\xB7" }, isError && /*#__PURE__*/React.createElement(Flex, { xcss: iconSpacingStyles.space050 }, /*#__PURE__*/React.createElement(WarningIcon, { color: "var(--ds-icon-warning, #E06C00)", label: errorIconLabel ? errorIconLabel : '' })), items.map((item, key) => Object.assign({}, item, { key }))); }; Footer.displayName = 'CommentFooter'; export default Footer;