🚨chore: swalFire alert 일경우 리턴 함수 추가
This commit is contained in:
parent
974a380e75
commit
a7365b98e4
@ -520,6 +520,11 @@ export default function Playground() {
|
||||
<div className="my-2">
|
||||
<p>{managementStateLoaded?.objectNo}</p>
|
||||
</div>
|
||||
<div className="my-2">
|
||||
<Button onClick={() => swalFire({ text: 'alert 테스트입니다.', type: 'alert', confirmFn: () => console.log('Alert!!!') })}>
|
||||
Sweetalert - alert
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
|
||||
@ -21,6 +21,8 @@ export const useSwal = () => {
|
||||
text,
|
||||
icon: icon === '' ? 'success' : icon,
|
||||
confirmButtonText: '확인',
|
||||
}).then(() => {
|
||||
confirmFn()
|
||||
})
|
||||
} else if (type === 'confirm') {
|
||||
MySwal.fire({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user