apvarun/toastify-js

Support box shadow colors

iUnstable0 opened this issue · 3 comments

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

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);

GGyll commented

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 when applying css styles from JS, we need to switch from kebab case to camel case and so 'box-shadow' becomes boxShadow