apvarun / toastify-js

Pure JavaScript library for better notification messages
https://apvarun.github.io/toastify-js/
MIT License
2.09k stars 230 forks source link

Support box shadow colors #100

Open iUnstable0 opened 2 years ago

iUnstable0 commented 2 years ago

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

eyupfidan commented 2 years ago

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 1 year ago

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.

apvarun commented 1 year ago

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