Design: Brotkrume ohne Link beim letzten Eintrag, Eingabefelder in Altcontainern wieder volle Breite
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
822387e4f7
commit
769ec70847
2 files changed
+5
-2
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { Fragment } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
||||
// crumb: [{ label, to? }] steht vor dem Kopf; Eintraege mit "to" sind Links, die anderen Text
|
||||
// crumb: [{ label, to? }] steht vor dem Kopf; Eintraege mit "to" sind Links, das letzte Element ist immer Text
|
||||
export default function PageHeader({ title, subtitle, actions, eyebrow, crumb, children }) {
|
||||
return (
|
||||
<>
|
||||
@@ -10,7 +10,7 @@ export default function PageHeader({ title, subtitle, actions, eyebrow, crumb, c
|
||||
{crumb.map((c, i) => (
|
||||
<Fragment key={i}>
|
||||
{i > 0 && <span className="faint">/</span>}
|
||||
{c.to ? <Link to={c.to}>{c.label}</Link> : <span>{c.label}</span>}
|
||||
{c.to && i < crumb.length - 1 ? <Link to={c.to}>{c.label}</Link> : <span>{c.label}</span>}
|
||||
</Fragment>
|
||||
))}
|
||||
</nav>
|
||||
|
||||
Reference in new issue
Block a user