toastify-js icon indicating copy to clipboard operation
toastify-js copied to clipboard

Support box shadow colors

Open iUnstable0 opened this issue 3 years ago • 3 comments

I cannot change box shadow and it's limited to blue color, please let me choose my own box shadow color. thanks!

iUnstable0 avatar Apr 06 '22 16:04 iUnstable0

You can add it as a property when calling the function.

setTimeout(function() { Toastify({ text: "Highly customizable", gravity: "bottom", position: 'left', close: true, style: { background: "linear-gradient(to right, #ff5f6d, #ffc371)", box-shadow: 5px 10px; } }).showToast(); }, 3000);

eyupfidan avatar Jul 25 '22 05:07 eyupfidan

You can add it as a property when calling the function.

setTimeout(function() { Toastify({ text: "Highly customizable", gravity: "bottom", position: 'left', close: true, style: { background: "linear-gradient(to right, #ff5f6d, #ffc371)", box-shadow: 5px 10px; } }).showToast(); }, 3000);

This gives me Uncaught SyntaxError: Unexpected token '-' (at ....)

I am trying to use border-radius and it throws the same error.

GGyll avatar Nov 06 '22 19:11 GGyll

@GGyll when applying css styles from JS, we need to switch from kebab case to camel case and so 'box-shadow' becomes boxShadow

apvarun avatar Nov 08 '22 07:11 apvarun