diff --git a/src/Components/Templates/CardPage.tsx b/src/Components/Templates/CardPage.tsx index c3a9841d..57dc523a 100644 --- a/src/Components/Templates/CardPage.tsx +++ b/src/Components/Templates/CardPage.tsx @@ -3,8 +3,9 @@ import * as React from "react" import {TitleCard} from "./TitleCard" -export function CardPage({title,children, parent} : { +export function CardPage({title, hideTitle, children, parent} : { title: string, + hideTitle?: boolean, children?: React.ReactNode, parent?: {name: string, url: string} }) { @@ -20,7 +21,7 @@ export function CardPage({title,children, parent} : {
  • {title}
  • - + {children} diff --git a/src/Components/Templates/TitleCard.tsx b/src/Components/Templates/TitleCard.tsx index 9c7f949d..36506cf9 100644 --- a/src/Components/Templates/TitleCard.tsx +++ b/src/Components/Templates/TitleCard.tsx @@ -3,34 +3,39 @@ import * as React from "react" interface TitleCardProps { - title: string, - children : React.ReactNode, - topMargin: string, + title?: string, + hideTitle?: boolean, + children?: React.ReactNode, + topMargin?: string, className?: string, TopSideButtons?: any } - - export function TitleCard({title, children, topMargin, TopSideButtons, className} : TitleCardProps){ - return( -
    - {/* Title for Card */} - - {title} +export function TitleCard({ title,hideTitle, children, topMargin, TopSideButtons, className }: TitleCardProps) { + return ( +
    - {/* Top side button, show only if present */} - { - TopSideButtons &&
    {TopSideButtons}
    - } - - -
    - - {/** Card Body */} -
    - {children} -
    -
    - - ) - } + {!hideTitle && + <> + + < Subtitle styleClass={TopSideButtons ? "tw-inline-block" : ""}> + {title} + + {/* Top side button, show only if present */} + { + TopSideButtons &&
    {TopSideButtons}
    + } +
    +
    + + } + + + {/** Card Body */} +
    + {children} +
    +
    + + ) +}