MCPcopy Index your code
hub / github.com/sqlchat/sqlchat / ActionConfirmModal

Function ActionConfirmModal

src/components/ActionConfirmModal.tsx:12–37  ·  view source on GitHub ↗
(props: ActionConfirmModalProps)

Source from the content-addressed store, hash-verified

10}
11
12const ActionConfirmModal = (props: ActionConfirmModalProps) => {
13 const { close, confirm, title, content, confirmButtonStyle } = props;
14 const { t } = useTranslation();
15
16 return (
17 <Modal title={title} onClose={close}>
18 <div className="w-full flex flex-col justify-start items-start mt-2">
19 <p className="text-gray-500">{content}</p>
20 </div>
21 <div className="w-full flex flex-row justify-end items-center mt-4 space-x-2">
22 <button className="btn btn-outline" onClick={close}>
23 {t("common.close")}
24 </button>
25 <button
26 className={`btn ${confirmButtonStyle}`}
27 onClick={() => {
28 confirm();
29 close();
30 }}
31 >
32 {t("common.confirm")}
33 </button>
34 </div>
35 </Modal>
36 );
37};
38
39export default ActionConfirmModal;

Callers

nothing calls this directly

Calls 1

closeFunction · 0.70

Tested by

no test coverage detected