From 96cd1450599c51488d2dbba37802ae0d498080f3 Mon Sep 17 00:00:00 2001 From: Ilya Berhanin Date: Sat, 5 Feb 2022 03:16:59 +0300 Subject: [PATCH] feat: add custom icon usage example --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 19b5d2f..cc856c4 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,15 @@ All Good Now you have this cool toast in your project.. name : 'watch', after : true // this will append the icon to the end of content } + + // or you can return dom element + iconPack: 'callBack', + icon: element => { // element is tag by default, + // so you can use the element or create your own one + const icon = document.createElement("img"); + icon.setAttribute("src", 'path-to-the-image'); + return icon; + }, } ```