import React from "react";
import styles from "./PrettyForm.module.css";

export default function PrettyForm({
  globalError,
  children
}: {
  globalError: string | null;
  children: React.ReactNode;
}) {
  return (
    <div className={styles.form}>
      {globalError && <p className={styles.error}>{globalError}</p>}
      {children}
    </div>
  );
}
