parent property for CardPage

This commit is contained in:
Anton 2023-10-04 17:51:52 +02:00
parent 20790168f6
commit b3370114dd
2 changed files with 4 additions and 2 deletions

View File

@ -3,9 +3,10 @@ import * as React from "react"
import {TitleCard} from "./TitleCard"
export function CardPage({title,children} : {
export function CardPage({title,children, parent} : {
title: string,
children?: React.ReactNode,
parent?: {name: string, url: string}
}) {
@ -15,6 +16,7 @@ export function CardPage({title,children} : {
<div className="tw-text-sm tw-breadcrumbs">
<ul>
<li><Link to={'/'} >Home</Link></li>
{parent && <li><Link to={parent?.url ? parent?.url : ""}>{parent?.name}</Link></li>}
<li>{title}</li>
</ul>
</div>

View File

@ -27,7 +27,7 @@ interface TitleCardProps {
<div className="tw-divider tw-mt-2"></div>
{/** Card Body */}
<div className='tw-h-full tw-w-full tw-pb-6 tw-bg-base-100'>
<div className='tw-h-full tw-bg-transparent tw-w-full tw-pb-6 tw-bg-base-100'>
{children}
</div>
</div>