import React from "react";
import { Link } from "react-router-dom";

interface EntranceCardProps {
  name: string;
  path: string;
  description?: string;
}

export function EntranceCard({ name, path, description }: EntranceCardProps) {
  return (
    <Link to={path} className="slds-text-link_reset">
      <div className="slds-card">
        <div className="slds-card__body slds-card__body_inner">
          <h3 className="slds-text-heading_medium slds-p-bottom_small">
            {name}
          </h3>
          {description && (
            <p className="slds-text-body_regular slds-text-color_weak">
              {description}
            </p>
          )}
        </div>
      </div>
    </Link>
  );
}
