@kubit-ui-web/react-components
Version:
Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience
17 lines • 505 B
JavaScript
import { SelectorBoxFileStateType } from '../types/state';
export const getState = (loading, success, error, disabled) => {
if (disabled) {
return SelectorBoxFileStateType.DISABLED;
}
if (error) {
return SelectorBoxFileStateType.ERROR;
}
if (success) {
return SelectorBoxFileStateType.SUCCESS;
}
if (loading) {
return SelectorBoxFileStateType.LOADING;
}
return SelectorBoxFileStateType.DEFAULT;
};
//# sourceMappingURL=state.utils.js.map