Compound API (Root/Header/Content/Footer/Title/Description) with data-scope/data-part attributes, CardPropsSchema, and CardMeta. 4 tests passing.
14 lines
445 B
TypeScript
14 lines
445 B
TypeScript
import type { JSX } from "solid-js";
|
|
import { splitProps } from "solid-js";
|
|
import type { CardHeaderProps } from "./card.props";
|
|
|
|
/** The header section of a Card, typically containing a title and description. */
|
|
export function CardHeader(props: CardHeaderProps): JSX.Element {
|
|
const [local, rest] = splitProps(props, ["children"]);
|
|
return (
|
|
<div data-scope="card" data-part="header" {...rest}>
|
|
{local.children}
|
|
</div>
|
|
);
|
|
}
|