Skip to content

Commit

Permalink
feat: implement modal removal function
Browse files Browse the repository at this point in the history
This function removes a modal element from the DOM based on the provided
configuration. It utilizes strict mode for improved code quality and
reliability.
  • Loading branch information
chessurisme committed May 28, 2024
1 parent 9993003 commit 123125b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/components/modal/modal-remove.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
'use strict'

import { isConfigVerified } from '../../utilities/config/config-verifier'

function removeModal(config) {
if (!isConfigVerified(config)) return

const { id } = config
const MODAL = document.createElement(id)

if (!MODAL) return
MODAL.remove()
}

export { removeModal }

0 comments on commit 123125b

Please sign in to comment.