Created
April 4, 2024 10:53
-
-
Save developertugrul/710d1d1b45b1b54f8f5511a5ffb6b283 to your computer and use it in GitHub Desktop.
Swal alert with custom HTML React
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const MySwal = withReactContent(Swal); | |
MySwal.fire({ | |
title: t("products:imported_price_list"), | |
html: importedPriceList.map(item => { | |
return `<div>${item.product_code} - ${item.priceList.map(price => `${price.id}: ${price.price}`).join(", ")}</div>`; | |
}).join("") | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment