@atlaskit/modal-dialog
Version:
A modal dialog displays content that requires user interaction, in a layer above the page.
30 lines • 1.13 kB
JavaScript
/* modal-footer.tsx generated by @compiled/babel-plugin v0.39.1 */
import "./modal-footer.compiled.css";
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
import { useModal } from './hooks';
const 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)
*/
const ModalFooter = props => {
const {
children,
testId: userDefinedTestId
} = props;
const {
testId: modalTestId
} = useModal();
const testId = userDefinedTestId || modalTestId && `${modalTestId}--footer`;
return /*#__PURE__*/React.createElement("div", {
"data-testid": testId,
className: ax(["_zulpu2gc _18zr1ejb _1e0c1txw _kqswh2mm _4cvr1h6o _1bahesu3 _1pfh1i6y _85i51ejb _1q51pxbi"])
}, children);
};
export default ModalFooter;