Closed WilliamDASILVA closed 7 years ago
Hi William, thanks for your code!
I believe that all custom stylings should be done via scss/css, not javascript. You can easily override all styles, including buttons, using base .ion-datetime-picker-popup
class.
I know that the styling of the buttons is not done in the best way now. I will consider some better way for the next mayor release.
Thanks anyway, good job!
I was actually just about to submit this pull request.
I understand your rationale for keeping styling separate from logic @katemihalikova but altering the buttons would be too clunky otherwise. For example, I want to change the cancel button from "button-stable" to "button-dark button-outline" to match the aesthetics of the rest of my app. To do this with pure scss / css would be very clunky.
I see that ionic mixins are not help here as they are too specific to fit this use-case. Using @extend .button-dark.button-outline;
syntax should help, but it's not very elegant.
Seems like @WilliamDASILVA deleted their fork and I'm not able to reopen this, I'll open a new PR myself then.
Yes I've deleted indeed because I've found that same solution to change it via SCSS as you said above. It did the trick as expected but It would be better without.
No problem, I've managed to get the feature released anyway. You were right that this way it's far easier. I've somehow thought that ionic has nice mixins for buttons but it seems that I've confused it with sth else. Thanks for your work!
Hello there,
I added the possibility to change the button's class via the $ionicPickerI18n object.
William