Replies: 1 comment
-
Hey @reinisg! Currently it's only possible to set a text string for the close button. You could work around it though with something like this: <script>
const modalCloseButtons = document.querySelectorAll('.modal__close button')
modalCloseButtons.forEach((button) => {
button.innerHTML = `
<span class="sr-only">Close</span>
<svg width="20" height="20" aria-hidden="true" fill="black" xmlns="http://www.w3.org/2000/svg"><path d="M10 10 2 2m8 8 8 8m-8-8 8-8m-8 8-8 8" stroke="black" stroke-width="2.667" stroke-linecap="round" stroke-linejoin="round"/></svg>
`
})
</script> .modal__close button {
display: flex;
justify-content: flex-end;
} Which would give you the following result: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to change modal close button icon to custom icon? If it is possible, could some please provide example?
Regards, Reinis
Beta Was this translation helpful? Give feedback.
All reactions