Skip to content

Commit

Permalink
Class CSS map keys converted to camelcase for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyjb committed Mar 18, 2018
1 parent ecf849e commit 6e9f66c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions module/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ export class CharacterCount {
// maximum.
if (maxCharacters > 0) {
if (characters > maxCharacters) {
this._dom.counter.classList.add(cls.css['max-exceeded'])
this._dom.counter.classList.add(cls.css['maxExceeded'])
} else {
this._dom.counter.classList.remove(cls.css['max-exceeded'])
this._dom.counter.classList.remove(cls.css['maxExceeded'])
}
}
}
Expand Down Expand Up @@ -186,6 +186,6 @@ CharacterCount.css = {
* Applied to the counter element if the number of characters exceeds the
* maximum number of characters.
*/
'max-exceeded': 'mh-counter--max-exceeded'
'maxExceeded': 'mh-counter--max-exceeded'

}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "manhattan-character-count",
"version": "1.0.3",
"version": "1.0.4",
"description": "Add a character count to a text input or textarea.",
"engines": {
"node": ">=8.9.4"
Expand Down
2 changes: 1 addition & 1 deletion spec/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ describe('CharacterCounter', () => {
.equal('12 / 10')

characterCountWithMax.counter.classList
.contains(CharacterCount.css['max-exceeded'])
.contains(CharacterCount.css['maxExceeded'])
.should
.be
.true
Expand Down

0 comments on commit 6e9f66c

Please sign in to comment.