Files
coder/site/src/components/StackLabel/StackLabel.tsx
T
Michael Smith d3bf5065a0 chore(site): convert more components from Emotion to TailwindCSS (#19719)
## 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
2025-09-17 18:55:25 -04:00

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}
/>
);
};