Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
renderColumnTitle = (columnIndex, columnProps = {}) => {
const { width, align, whiteSpace } = columnProps;
const cellProps = { width, align, whiteSpace, className: "cell" };
const headerCell = content => (
{content}
);
if (columnProps.customTitle) {
return headerCell(columnProps.customTitle(this.props.data, this.state));
}
if (columnProps.clickable) {
return headerCell(
<div>
{columnProps.title}
</div>,
);
}
if (columnProps.title) {
return headerCell(
imageSrc,
icon,
title,
description,
actions,
info,
}) => (
{description && (
)}
grouped,
addProps: addedProps => {
mutable.injectedProps = addedProps;
},
}),
);
}
if (props.text) {
const text = props.text(row);
const textProps = {
align: props.align,
size: fontSizes.MEDIUM,
};
const type = props.fontType ? props.fontType : fontTypes.NORMAL;
return bodyCell(
,
);
}
return bodyCell(null);
};