index.ts 439 Bytes
import { ListGridType } from '../types';

export const getListGridByColumn = (col: number): Omit<ListGridType, 'gutter' | 'column'> => {
  return {
    xxl: col,
    xl: col,
    lg: col,
    md: col,
    sm: col,
    xs: col,
  };
  // return {
  //   xxl: col,
  //   xl: Math.max(1, col - 1),
  //   lg: Math.max(1, col - 2),
  //   md: Math.max(1, col - 3),
  //   sm: Math.max(1, col - 4),
  //   xs: Math.max(1, col - 5),
  // };
};