33import {
44 ArrowClockwiseIcon ,
55 ArrowLeftIcon ,
6+ BookIcon ,
67 PlusIcon ,
78} from '@phosphor-icons/react' ;
89import Link from 'next/link' ;
@@ -35,6 +36,8 @@ interface WebsitePageHeaderProps {
3536 variant ?: 'default' | 'minimal' ;
3637
3738 additionalActions ?: ReactNode ;
39+
40+ docsUrl ?: string ;
3841}
3942
4043export function WebsitePageHeader ( {
@@ -53,6 +56,7 @@ export function WebsitePageHeader({
5356 showBackButton = false ,
5457 variant = 'default' ,
5558 additionalActions,
59+ docsUrl,
5660} : WebsitePageHeaderProps ) {
5761 const renderSubtitle = ( ) => {
5862 if ( isLoading ) {
@@ -103,6 +107,19 @@ export function WebsitePageHeader({
103107 </ div >
104108
105109 < div className = "flex items-center gap-3" >
110+ { docsUrl && (
111+ < Button asChild variant = "outline" >
112+ < Link
113+ className = "cursor-pointer gap-2 transition-all duration-300 hover:border-primary/50 hover:bg-primary/5"
114+ href = { docsUrl }
115+ rel = "noopener noreferrer"
116+ target = "_blank"
117+ >
118+ < BookIcon size = { 16 } weight = "duotone" />
119+ < span className = "xs:inline hidden" > Docs</ span >
120+ </ Link >
121+ </ Button >
122+ ) }
106123 { onRefresh && (
107124 < Button
108125 className = "cursor-pointer gap-2 transition-all duration-300 hover:border-primary/50 hover:bg-primary/5"
@@ -149,6 +166,19 @@ export function WebsitePageHeader({
149166 </ div >
150167 </ div >
151168 < div className = "flex items-center gap-3" >
169+ { docsUrl && (
170+ < Button asChild variant = "outline" >
171+ < Link
172+ className = "cursor-pointer select-none gap-2 border-border/50"
173+ href = { docsUrl }
174+ rel = "noopener noreferrer"
175+ target = "_blank"
176+ >
177+ < BookIcon size = { 16 } />
178+ Documentation
179+ </ Link >
180+ </ Button >
181+ ) }
152182 { onRefresh && (
153183 < Button
154184 className = "cursor-pointer select-none gap-2 border-border/50"
0 commit comments