Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
const { label, removeIcon, count } = this.props;
const { color, borderColor } = getTagColorsFromName(label);
const tagStyle = {
backgroundColor: color,
borderColor: borderColor,
};
const countLabel = count !== 0 && <span>{`(${count})`}</span>;
return (
<span style="{tagStyle}">
{removeIcon && <i>}
{label} {countLabel}
</i></span><i>
);
}
}</i>
function getAuthLabelStyle(label: string) {
if (label === 'LDAP' || !label) {
return {};
}
const { color, borderColor } = getTagColorsFromName(label);
return {
'background-color': color,
'border-color': borderColor,
};
}
function getAuthLabelStyle(label: string) {
if (label === 'LDAP' || !label) {
return {};
}
const { color, borderColor } = getTagColorsFromName(label);
return {
'background-color': color,
'border-color': borderColor,
};
}
function setColor(name: string, element: JQuery) {
const { color, borderColor } = getTagColorsFromName(name);
element.css('background-color', color);
element.css('border-color', borderColor);
}