import { ReactNode } from "react";

import "./CardGrid.css";
import { renderProps, onLoad, getCN, get_typeName } from "../utils";

function CardGrid({
  children,
  size = "s",
  spaced = false,
  ...props
}: {
  [x: string]: any;
  size?: "s" | "m" | "l";
}) {
  return (
    <div
      {...renderProps(props)}
      className={getCN([
        "CardGrid",
        spaced && "CardGrid--spaced",
        `CardGrid--${size}`,
      ], props.className)}
    >
      {children}
    </div>
  );
}

export default CardGrid;
