Skip to content

Commit

Permalink
fix: update color helper to use options
Browse files Browse the repository at this point in the history
  • Loading branch information
rajasegar committed May 14, 2020
1 parent 2811a9d commit 736939e
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 444 deletions.
4 changes: 2 additions & 2 deletions addon/helpers/chance-color.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { helper } from '@ember/component/helper';
import Chance from 'chance';

export default helper(function chanceColor(params/*, hash */ ) {
export default helper(function chanceColor(params, { format, grayscale, casing } ) {
const chance = new Chance();
return chance.color();
return chance.color({format, grayscale, casing});
});
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@ember/optional-features": "^1.3.0",
"@glimmer/component": "^1.0.0",
"@glimmer/tracking": "^1.0.0",
"@semantic-release/changelog": "^5.0.1",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"coveralls": "^3.1.0",
Expand Down Expand Up @@ -71,5 +72,14 @@
},
"ember-addon": {
"configPath": "tests/dummy/config"
},
"release": {
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/github",
"@semantic-release/npm",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog"
]
}
}
Loading

0 comments on commit 736939e

Please sign in to comment.