-
-
Notifications
You must be signed in to change notification settings - Fork 132
Allow deactivation of automatic color styling #37
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
e18a628 to
ea85147
Compare
src/Button.vue
Outdated
| ? color || constants.colorChecked | ||
| : contains(color, 'checked') | ||
| ? color.checked | ||
| : constants.colorChecked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chaining ternary operators is an anti-pattern in javascript. Never use more than one.
( 3 (!!!) here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who says so? But sure, I'll change it.
src/Button.vue
Outdated
| ? undefined | ||
| : contains(color, 'unchecked') | ||
| ? color.unchecked | ||
| : constants.colorUnchecked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
|
I don't think that it is the right place to do it at all. I would rather put a simple check in here: vue-js-toggle-button/src/Button.vue Line 103 in aee66e0
Something like: Pretty much thats the only change that should be done to the old code. |
ea85147 to
b1c0879
Compare
|
You're right. The previous commit was a left over of the approach in the first attempt + programming before coffee this morning. This is much cleaner now. Thanks! |
|
Nice, great job 👍 I will publish it whenever I'll get my laptop (monday/tuesday) |
|
Very cool, thanks! And take your time with releasing this. |
|
@euvl before you deploy a new version, you need to run |
|
Oh, dont worry, i will rebuild it anyways. I had a case on another project i was working on, where someone tried to commit a change with bitcoin miner in dist file 😄 Some people use plugin directly from Github repo, for example, in china npm sometimes is not an option (as far as i was told), i don't remember other cases, but having dist in main repo is a good thing for plugin 😄 |
|
Btw I got my laptop yesterday night so will be able to publish this one tonight. |
|
@euvl friendly reminder to not forget to publish this. And I hope the new 💻 is 💯! |
|
@euvl any chance to publish a new version? Sorry for keep bugging you... |
|
Wow, i completely forgot about it, will do tonight. THanks 👍 😄 |
|
👋 |
Closes #36