File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,29 @@ export function DynamicPage({
2323} : Props ) {
2424 return (
2525 < div >
26+ { page . showBack && (
27+ < button
28+ type = "button"
29+ onClick = { ( ) => window . history . back ( ) }
30+ className = "mb-2 flex items-center gap-1 text-sm text-(--muted-foreground) hover:text-(--foreground) transition-colors"
31+ >
32+ < svg
33+ className = "h-4 w-4"
34+ fill = "none"
35+ viewBox = "0 0 24 24"
36+ strokeWidth = { 2 }
37+ stroke = "currentColor"
38+ aria-hidden = "true"
39+ >
40+ < path
41+ strokeLinecap = "round"
42+ strokeLinejoin = "round"
43+ d = "M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"
44+ />
45+ </ svg >
46+ Back
47+ </ button >
48+ ) }
2649 < h1 className = "text-2xl font-bold" > { page . title } </ h1 >
2750
2851 < div
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ export interface PageDefinition {
3535 layout : "default" | "full-width" | "split" ;
3636 sections : PageSection [ ] ;
3737 requiredPermission ?: string ;
38+ showBack ?: boolean ;
3839}
3940
4041export type JsonValue =
You can’t perform that action at this time.
0 commit comments