Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const baseStyle = {
icon: style.iconBase,
container: style.buttonBase,
};
const disabledStyle = {
icon: style.iconBase,
container: style.buttonDisabled,
};
const activeStyle = {
icon: { ...style.iconBase, fill: theme.primary800 },
container: {
...style.buttonBase,
backgroundColor: theme.primary100,
},
};
const inactiveStyle = disabled => (disabled ? disabledStyle : baseStyle);
const tableBtnStyle = (activeType, disabled) =>
[REPORT_TABLE, EVENT_REPORT].includes(activeType)
? activeStyle
: inactiveStyle(disabled);
const chartBtnStyle = (activeType, disabled) =>
[CHART, EVENT_CHART].includes(activeType)
? activeStyle
: inactiveStyle(disabled);
const mapBtnStyle = (activeType, disabled) =>