import React from "react";
import "./card-styles.scss";
import { CardProps } from "@app/models/components";
import { mapLevelToShadow } from "@app/services/utilities";

const Card: React.FC<CardProps> = ({
  onClick,
  style,
  elevation = "sm",
  children,
  id = "",
}) => {
  return (
    <div
      className={`card-root ${mapLevelToShadow(elevation)}`}
      style={style}
      onClick={onClick}
      id={id}
    >
      {children}
    </div>
  );
};

export default Card;
