-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSection.tsx
More file actions
39 lines (32 loc) · 1.02 KB
/
Section.tsx
File metadata and controls
39 lines (32 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import type { JSX } from "preact/jsx-runtime";
import { Heading1 } from "../../design/heading/Heading";
import { TextBlock } from "../../design/text-block/TextBlock";
import styles from "./Section.module.css";
export interface SectionProps {
iconUrl: string;
iconSize?: number;
title: string;
description: string;
action: JSX.Element;
preview: JSX.Element | JSX.Element[];
}
export function Section(props: SectionProps) {
const { iconUrl, iconSize, title, description, action, preview } = props;
return (
<section className={styles.section}>
<div className={styles.sectionContent}>
<img src={iconUrl} height={iconSize ?? 80} alt={title} />
<Heading1 large>{title}</Heading1>
<TextBlock size="large">{description}</TextBlock>
{action}
</div>
{preview}
</section>
);
}
export interface SectionsProps {
children: JSX.Element | JSX.Element[];
}
export function Sections({ children }: SectionsProps) {
return <div className={styles.sections}>{children}</div>;
}