color selected displays checkboxes to show loading status

This commit is contained in:
Matt Walsh
2022-12-14 11:20:25 -06:00
parent b336b01059
commit 8df8fc25dc
8 changed files with 91 additions and 58 deletions

View File

@@ -7,4 +7,29 @@ const STATUS = {
retrying: Symbol('retyring'),
};
const calcStatusClass = (statusCode) => {
switch (statusCode) {
case STATUS.loading:
return 'loading';
case STATUS.loaded:
return 'press-here';
case STATUS.failed:
return 'failed';
case STATUS.noData:
return 'no-data';
case STATUS.disabled:
return 'disabled';
case STATUS.retrying:
return 'retrying';
default:
return '';
}
};
const statusClasses = ['loading', 'press-here', 'failed', 'no-data', 'disabled', 'retrying'];
export default STATUS;
export {
calcStatusClass,
statusClasses,
};