Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
27 lines
735 B
Plaintext
27 lines
735 B
Plaintext
import { jsx as _jsx } from "react/jsx-runtime";
|
|
import { useModal } from '@faceless-ui/modal';
|
|
import { XIcon } from '../../icons/X/index.js';
|
|
import { useTranslation } from '../../providers/Translation/index.js';
|
|
import './index.scss';
|
|
const baseClass = 'close-modal-button';
|
|
export function CloseModalButton({
|
|
slug,
|
|
className
|
|
}) {
|
|
const {
|
|
closeModal
|
|
} = useModal();
|
|
const {
|
|
t
|
|
} = useTranslation();
|
|
return /*#__PURE__*/_jsx("button", {
|
|
"aria-label": t('general:close'),
|
|
className: [baseClass, className].filter(Boolean).join(' '),
|
|
onClick: () => {
|
|
closeModal(slug);
|
|
},
|
|
type: "button",
|
|
children: /*#__PURE__*/_jsx(XIcon, {})
|
|
}, "close-button");
|
|
}
|
|
//# sourceMappingURL=index.js.map |