-
Notifications
You must be signed in to change notification settings - Fork 106
Feature/Support for additional custom classes #26
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
Conversation
Aaah, you beat me! |
Nice job!
Anyway, the only downside I see to the PR is possibly (note: not a real use case right now) that you wouldn't be able to set a custom class to an element internally within a component, for instance I'd like to see a custom class on the h6-elements (title if specified)! |
Thank you for the review :) I have completely missed title part, but it would be nice to have that part also. I thought about the referencing parent data and child components as well but focused more on a fast solution. But I (or we) could definitely fix that part also. By the way, you are very welcome to contribute/edit my changes :) |
@hjortzen @elibolonur thanks for the good work. Would you prefer I create a new branch (development branch) such that every pull request is first merged into that branch and modified if need be and merged into master when complete? This pull is nice but I think your(@hjortzen) solution would be easier to maintain. Maybe you can edit @elibolonur 's commit to work like yours? |
Welcome :) @Godofbrowser dev branch would be nice to have! |
I'm sorry for being slow to respond, illness within the family :( |
Btw, I recently pushed my semi-done solution into my branch... |
I'm sorry about that @hjortzen , i hope all is well now. |
@elibolonur PR merged. Thanks. I still believe a few improvements can be made to the implementation on the dev branch before finally merging into master. @hjortzen I'm checking out your implementation. @elibolonur 's done a great job and i'm looking for a way to make the config available to child components as well. On the other hand, i still think its equally possible to override the dialog's styles without writing new rules. .btn-success {
background-color: green;
} this can be extended to the dialog's button by doing .btn-success, .dg-btn--ok {
background-color: green;
} |
Great, thanks :) |
Options now takes in a property named customClass object to be able to inject custom class names in to the elements.
Example:
customClass properties are optional and users can prefer to inject a single or all classes. Moreover, users can inject multiple classes to a single element.