1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-10-14 03:04:26 -04:00

all components should accept additional classnames

This commit is contained in:
2022-01-20 12:06:05 -05:00
parent 2162e9d563
commit 7e37adabc1
22 changed files with 150 additions and 86 deletions

View File

@@ -11,6 +11,10 @@ import type { FormikHelpers } from "formik";
import styles from "./ContactForm.module.css";
const cx = classNames.bind(styles);
type Props = {
className?: string;
};
type Values = {
name: string;
email: string;
@@ -18,7 +22,7 @@ type Values = {
"h-captcha-response": string;
};
const ContactForm = () => {
const ContactForm = ({ className }: Props) => {
const { resolvedTheme } = useTheme();
// status/feedback:
@@ -97,7 +101,7 @@ const ContactForm = () => {
}}
>
{({ setFieldValue, isSubmitting, touched, errors }) => (
<Form className={styles.form} name="contact">
<Form className={className} name="contact">
<Field
className={cx({ input: true, missing: errors.name && touched.name })}
name="name"