Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aos
GitHub Repository: aos/grafana-agent
Path: blob/main/web/ui/src/features/layout/Page.tsx
5333 views
1
import { FC, ReactNode } from 'react';
2
import { IconProp } from '@fortawesome/fontawesome-svg-core';
3
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
5
import styles from './Page.module.css';
6
7
export interface PageProps {
8
name: string;
9
desc: string;
10
icon: IconProp;
11
children?: ReactNode;
12
}
13
14
const Page: FC<PageProps> = (props) => {
15
return (
16
<div className={styles.page}>
17
<header className={styles.header}>
18
<div className={styles.icon}>
19
<FontAwesomeIcon icon={props.icon} />
20
</div>
21
<div className={styles.info}>
22
<h1>{props.name}</h1>
23
<h2>{props.desc}</h2>
24
</div>
25
</header>
26
<main>{props.children}</main>
27
</div>
28
);
29
};
30
31
export default Page;
32
33