import { ReactNode } from "react";
import clsx from "clsx";

import styles from "./Card.module.scss";

type CardProps = React.HTMLAttributes<HTMLDivElement> & {
  children: ReactNode;
  style?: React.CSSProperties;
  onClick?: () => void;
};

export default function Card({
  children,
  className,
  style,
  onClick,
  ...props
}: CardProps) {
  return (
    <div
      className={clsx(styles.card, className)}
      style={style}
      onClick={onClick}
      {...props}
    >
      {children}
    </div>
  );
}
