import React from "react"; import styles from "./ComponentWrapper.module.css"; type AlignOption = "left" | "center" | "right"; type ComponentWrapperProps = { children: React.ReactNode; heading: string; body: string; align?: AlignOption; noBackground?: boolean; center?: boolean; }; export function ComponentWrapper({ heading, body, children, align = "left", noBackground = false, }: ComponentWrapperProps) { const alignClasses: { [key in AlignOption]: string } = { left: styles.wrapperLeft, center: styles.wrapperCenter, right: styles.wrapperRight, }; return (

{heading}

{body}

{children}
); }