mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
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:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user