Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass CSS classes to div.snotfiy #64

Open
knackjason opened this issue Nov 14, 2018 · 1 comment
Open

Pass CSS classes to div.snotfiy #64

knackjason opened this issue Nov 14, 2018 · 1 comment

Comments

@knackjason
Copy link

knackjason commented Nov 14, 2018

Would it be possible to add a prop to the Snotify component so that we can pass in a custom CSS class? I'd like to be able to conditionally apply a CSS class at runtime to the .snotify div based on the value of a JS variable.

I'm working around this right now by attaching an event handler to each SnotifyToast object but my code is anything but DRY because of this. It'd be much simpler to do something like <vue-snotify :snotify-class="{ myClass: myBooleanProp }" /> in my template.

@jwhitmarsh
Copy link

I'd add to this and say it'd be great if we could also pass a class name in the config object:

this.$notify.error('message', {
  customClass: 'foo'
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants