mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
parent property for CardPage
This commit is contained in:
parent
20790168f6
commit
b3370114dd
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user