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

/** The heading element within a Card header. */
export function CardTitle(props: CardTitleProps): JSX.Element {
  const [local, rest] = splitProps(props, ["children"]);
  return (
    <h3 data-scope="card" data-part="title" {...rest}>
      {local.children}
    </h3>
  );
}
