mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
## Changes made - Patched React `CSSProperties` type to add support for custom CSS properties - Updated several of the components in the `components` directory to Tailwind - Updated most of the `WorkspacePageBuildView` component to Tailwind to account for CSS specificity changes - Updated `Search` to address accessibility violation and removed all MUI logic - Updated `Search` stories (added new story, decoupled all stories from single decorator) - Updated `autoFocus` behavior in `SearchField` - Updated the styling for `WorkspacePageBuildView` to make sure the tabs had enough padding - Fixed layout effect in `WorkspacePageBuildView` to fire correctly
37 lines
794 B
TypeScript
37 lines
794 B
TypeScript
import FormHelperText, {
|
|
type FormHelperTextProps,
|
|
} from "@mui/material/FormHelperText";
|
|
import { Stack } from "components/Stack/Stack";
|
|
import type { ComponentProps, FC } from "react";
|
|
import { cn } from "utils/cn";
|
|
|
|
/**
|
|
* Use these components as the label in FormControlLabel when implementing radio
|
|
* buttons, checkboxes, or switches to ensure proper styling.
|
|
*/
|
|
|
|
export const StackLabel: FC<ComponentProps<typeof Stack>> = ({
|
|
className,
|
|
...props
|
|
}) => {
|
|
return (
|
|
<Stack
|
|
spacing={0.5}
|
|
className={cn("pl-3 font-medium", className)}
|
|
{...props}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export const StackLabelHelperText: FC<FormHelperTextProps> = ({
|
|
className,
|
|
...props
|
|
}) => {
|
|
return (
|
|
<FormHelperText
|
|
className={cn("mt-0 [&_strong]:text-content-primary", className)}
|
|
{...props}
|
|
/>
|
|
);
|
|
};
|