@atlaskit/modal-dialog
Version:
A modal dialog displays content that requires user interaction, in a layer above the page.
35 lines (34 loc) • 2.04 kB
JavaScript
/* modal-footer.tsx generated by @compiled/babel-plugin v0.39.1 */
;
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
require("./modal-footer.compiled.css");
var React = _interopRequireWildcard(require("react"));
var _runtime = require("@compiled/react/runtime");
var _hooks = require("./hooks");
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
var footerStyles = null;
/**
* __Modal footer__
*
* A modal footer often contains a primary action and the ability to cancel and close the dialog, though can contain any React element.
*
* - [Examples](https://atlassian.design/components/modal-dialog/examples#modal-footer)
* - [Code](https://atlassian.design/components/modal-dialog/code#modal-footer-props)
* - [Usage](https://atlassian.design/components/modal-dialog/usage)
*/
var ModalFooter = function ModalFooter(props) {
var children = props.children,
userDefinedTestId = props.testId;
var _useModal = (0, _hooks.useModal)(),
modalTestId = _useModal.testId;
var testId = userDefinedTestId || modalTestId && "".concat(modalTestId, "--footer");
return /*#__PURE__*/React.createElement("div", {
"data-testid": testId,
className: (0, _runtime.ax)(["_zulpu2gc _18zr1ejb _1e0c1txw _kqswh2mm _4cvr1h6o _1bahesu3 _1pfh1i6y _85i51ejb _1q51pxbi"])
}, children);
};
var _default = exports.default = ModalFooter;