Function CardA

  • Renders a card around some content.

    <CardA variant="secondary">
    <h5>My Title</h5>
    <p>My content</p>

    The props type is defined as a separate interface which must be exported!

    export interface CardAProps {
    // ...

    export function CardA({
    variant = "primary",
    }: PropsWithChildren<CardAProps>): ReactElement {
    // ...

    This is our recommended way to define React components as it makes your code more readable. The minor drawback is you must click the CardAProps link to see the component's props.


    Returns ReactElement