Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const getColumns = (headers: string[]) => {
const cols = [
{
columnTransforms: [classNames('pf-m-fit-content')], // column sized to heading and data
title: headers[0],
},
{
columnTransforms: [classNames('pf-m-fit-content')],
title: headers[1],
},
{
columnTransforms: [classNames('pf-m-width-max')], // column sized to take up remaining space
title: headers[2],
},
{
columnTransforms: [classNames('pf-m-fit-content')],
title: headers[3],
},
];
return cols;
};
const getColumns = (headers: string[]) => {
const cols = [
{
columnTransforms: [classNames('pf-m-fit-content')], // column sized to heading and data
title: headers[0],
},
{
columnTransforms: [classNames('pf-m-fit-content')],
title: headers[1],
},
{
columnTransforms: [classNames('pf-m-width-max')], // column sized to take up remaining space
title: headers[2],
},
{
columnTransforms: [classNames('pf-m-fit-content')],
title: headers[3],
},
];
return cols;
};