@zohodesk/dot
Version:
In this Library, we Provide Some Basic Components to Build Your Application
16 lines (14 loc) • 522 B
JavaScript
import { THEME_APPEARANCES, THEME_COLORS } from "./constants";
export function validateAndLogError({
options,
value,
type
}) {
let isError = !options.includes(value);
if (isError) {
const themeAppearances = THEME_APPEARANCES.toString();
const themeColors = THEME_COLORS.toString();
console.error(`We do not support the '${value} ${type}'. Please provide valid '${type}' values or check spelling. DotProvider supports ${themeAppearances} appearance & ${themeColors} theme.`);
}
return isError;
}