import React, { memo } from 'react';

interface GenericColProps {
  columns: any[];
}

const GenericCol: React.FC<GenericColProps> = memo((props) => {
  const { columns } = props;
  return <colgroup>
    {
      columns?.map((column: any, index: number) => {
        return (
          <col
            key={index}
            style={{ minWidth: column?.name !== "checkbox" ? column.width : 50, width: column?.name !== "checkbox" ? column.width : 50 }}
          />
        )
      })
    }
  </colgroup>

})

export {
  GenericCol
}
