fix: demui <Form /> emotion usage (#27560)

Tiny simple change just moving us over to Tailwind instead of MUI for
`<Form />`. Functionally equivalent minus the mismatch between `md` in
`Tailwind` (`≥ 768px`) and `MUI` (`≥ 900px`).
This commit is contained in:
Jake Howell
2026-07-28 04:25:07 +00:00
committed by GitHub
parent b448de670b
commit 2794886688
+6 -13
View File
@@ -1,4 +1,3 @@
import { useTheme } from "@emotion/react";
import {
type ComponentProps,
createContext,
@@ -20,22 +19,16 @@ type FormProps = HTMLProps<HTMLFormElement> & {
direction?: FormContextValue["direction"];
};
export const Form: FC<FormProps> = ({ direction, ...formProps }) => {
const theme = useTheme();
export const Form: FC<FormProps> = ({ direction, className, ...formProps }) => {
return (
<FormContext.Provider value={{ direction }}>
<form
{...formProps}
css={{
display: "flex",
flexDirection: "column",
gap: direction === "horizontal" ? 80 : 40,
[theme.breakpoints.down("md")]: {
gap: 64,
},
}}
className={cn(
"flex flex-col gap-16",
direction === "horizontal" ? "md:gap-20" : "md:gap-10",
className,
)}
/>
</FormContext.Provider>
);