fix: breakout header component to blocks header
This commit is contained in:
37
components/MyPages/Blocks/Header/index.tsx
Normal file
37
components/MyPages/Blocks/Header/index.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
import Link from "next/link"
|
||||
|
||||
import Title from "@/components/Title"
|
||||
|
||||
import styles from "./header.module.css"
|
||||
|
||||
import type { HeaderProps } from "@/types/components/myPages/stays/title"
|
||||
|
||||
export default function Header({ title, subtitle, link }: HeaderProps) {
|
||||
return (
|
||||
<>
|
||||
<header className={styles.header}>
|
||||
{title && (
|
||||
<Title
|
||||
as="h3"
|
||||
level="h2"
|
||||
className={styles.title}
|
||||
weight="medium"
|
||||
uppercase
|
||||
>
|
||||
{title}
|
||||
</Title>
|
||||
)}
|
||||
{link && (
|
||||
<Link className={styles.link} href={link.href}>
|
||||
{link.text}
|
||||
</Link>
|
||||
)}
|
||||
{subtitle && (
|
||||
<Title as="h5" weight="regular" className={styles.subtitle}>
|
||||
{subtitle}
|
||||
</Title>
|
||||
)}
|
||||
</header>
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user