Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.

Commit ae4d984

Browse files
author
Giovanni Frigo
committedDec 19, 2018
Adding the shade 500 as an explicit default argument
1 parent 5f633cb commit ae4d984

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function getColorObj(text) {
1414
}
1515

1616
/* Get a ready-to-use Style object of the Material color of a string */
17-
function toMaterialStyle(text, shade) {
17+
function toMaterialStyle(text, shade = 500) {
1818
let shadeStr = `${shade}`; // convert shade to string
1919
if (!availableShades.includes(shadeStr)) {
2020
shadeStr = '500';

0 commit comments

Comments
 (0)
This repository has been archived.