fix header text

This commit is contained in:
SrGooglo 2025-03-06 03:51:28 +00:00
parent 34123d6d0c
commit a25a82e333

View File

@ -31,13 +31,12 @@ function ConfirmModal(props) {
} }
} }
return <div className="drawer_close_confirm"> return (
<div className="drawer_close_confirm">
<div className="drawer_close_confirm_content"> <div className="drawer_close_confirm_content">
<h1>{props.headerText ?? "Are you sure?"} Are you sure?</h1> <h1>{props.headerText ?? "Are you sure?"}</h1>
{ {props.descriptionText && <p>{props.descriptionText}</p>}
props.descriptionText && <p>{props.descriptionText}</p>
}
</div> </div>
<div className="drawer_close_confirm_actions"> <div className="drawer_close_confirm_actions">
@ -56,6 +55,7 @@ function ConfirmModal(props) {
</Button> </Button>
</div> </div>
</div> </div>
)
} }
export default () => { export default () => {
@ -68,7 +68,7 @@ export default () => {
headerText: options.headerText, headerText: options.headerText,
descriptionText: options.descriptionText, descriptionText: options.descriptionText,
} },
}) })
} }
@ -84,9 +84,11 @@ export default () => {
className, className,
props, props,
} = {} } = {},
) { ) {
app.cores.window_mng.render(id, <Modal app.cores.window_mng.render(
id,
<Modal
onClose={() => { onClose={() => {
app.cores.window_mng.close(id) app.cores.window_mng.close(id)
}} }}
@ -96,10 +98,11 @@ export default () => {
confirmOnClickTitle={confirmOnClickTitle} confirmOnClickTitle={confirmOnClickTitle}
confirmOnClickContent={confirmOnClickContent} confirmOnClickContent={confirmOnClickContent}
> >
{ {React.isValidElement(render)
React.isValidElement(render) ? React.cloneElement(render, props) : React.createElement(render, props) ? React.cloneElement(render, props)
} : React.createElement(render, props)}
</Modal>) </Modal>,
)
} }
function close(id) { function close(id) {