-
Notifications
You must be signed in to change notification settings - Fork 333
Open
Description
The LevelThermometer component uses a hard coded value to determine the scale of the overall thermometer. If you change the pointsToLevels
and maxLevel
values in the constants file, the LevelThermometer will render incorrectly (since it's still referencing the hard coded value).
Locations where maxLevel
is hard coded instead of referenced.
https://github.com/Medium/snowflake/blob/master/components/LevelThermometer.js#L32
https://github.com/Medium/snowflake/blob/master/components/PointSummaries.js#L25
Example
Updating the following values in constants.js
results in a poorly formatted thermometer.
export const pointsToLevels = {
"0": "1",
"20": "2",
"24": "3",
"29": "4",
"34": "5",
"38": "6",
"43": "7",
"47": "8",
"49": "9",
"51": "10"
};
export const maxLevel = 52;
Metadata
Metadata
Assignees
Labels
No labels