import type { JSX } from "solid-js";
import { splitProps } from "solid-js";
import type { CardDescriptionProps } from "./card.props";

/** A supporting description paragraph within a Card header. */
export function CardDescription(props: CardDescriptionProps): JSX.Element {
  const [local, rest] = splitProps(props, ["children"]);
  return (
    <p data-scope="card" data-part="description" {...rest}>
      {local.children}
    </p>
  );
}
