Custom class injections
See original GitHub issueHi,
Very nice and useful plugin! In the project I am using the plugin, I have the case to call the modal a couple of times to confirm user actions. One of the dialogs is to confirm delete and another one is to save. So to have difference for confirmations I am overriding button colors (red on delete, green on save). The problem in this is that I have to inject different classes for styling (or <style> element inside the dialog initialization). Would you consider adding some custom class name injections in dialog initialization?
For example:
let options = {
html: false,
loader: false,
reverse: false,
okText: 'Continue',
cancelText: 'Close',
customClass: 'remove-class'
};
and remove-class will be injected to the div.dg-main-content, so we could override all other css thru this custom class. Just as an example, to have another solution like this would be nice 😃
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Dependency Injection in Custom Class - .NET Core
Dependency injection is a programming technique that makes a class independent of its dependencies. It achieves that by decoupling the usage of ...
Read more >Custom Classes and Dependency Injection
Using dependency injection with services is fairly straightforward and common place, ... Below is an example custom class that implements ...
Read more >Type Hinting and Method Injection in a Custom Class
I want to inject a custom class into the method of another class. ... <?php namespace App; class Rabbit { //The class to...
Read more >How do I instantiate a custom class with dependency injection?
A class implementing ContainerInjectionInterface is instantiated by calling the factory method create().
Read more >Is Dependency Injection Into a Custom Exception a Good Idea?
Investigating whether dependency injection into a custom Exception class a good idea. Published on 24 August 2021. C# · Code · Thoughts ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You’re welcome @elibolonur 😃
@hjortzen that’s equally a very good idea. But would mean too much configuration whereas a single css class can handle this and more.