microsoft/hve-core

Public

mirrored fromhttps://github.com/microsoft/hve-coreAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
copilot/docs-update-scripts-linting-readme

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

docs/docusaurus/src/components/HeroSection/index.tsx

44lines · modecode

1import React from 'react';
2import Link from '@docusaurus/Link';
3import styles from './styles.module.css';
4
5interface CtaLink {
6 label: string;
7 href: string;
8 primary?: boolean;
9}
10
11interface HeroSectionProps {
12 title: string;
13 subtitle: string;
14 cta?: CtaLink[];
15}
16
17export default function HeroSection({
18 title,
19 subtitle,
20 cta,
21}: HeroSectionProps): React.ReactElement {
22 return (
23 <header className={styles.hero}>
24 <div className={styles.heroPattern} />
25 <div className={styles.heroContent}>
26 <h1 className={styles.heroTitle}>{title}</h1>
27 <p className={styles.heroSubtitle}>{subtitle}</p>
28 {cta && cta.length > 0 && (
29 <div className={styles.heroCta}>
30 {cta.map((link) => (
31 <Link
32 key={link.href}
33 to={link.href}
34 className={link.primary ? styles.heroCtaPrimary : styles.heroCtaSecondary}
35 >
36 {link.label}
37 </Link>
38 ))}
39 </div>
40 )}
41 </div>
42 </header>
43 );
44}