feat(mui): kit — Select, StatusChip, CheckboxField, Alert

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
BOHA
2026-06-06 21:20:30 +02:00
parent 5855c94b50
commit 05f25931c9
5 changed files with 119 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import Chip, { type ChipProps } from "@mui/material/Chip";
type StatusChipProps = Omit<ChipProps, "color"> & {
color?: "default" | "success" | "error" | "warning" | "info";
};
/** Semantic status chip. Pass onClick to make it a clickable toggle. */
export default function StatusChip({
color = "default",
size = "small",
onClick,
sx,
...props
}: StatusChipProps) {
return (
<Chip
color={color}
size={size}
onClick={onClick}
sx={[
{ fontWeight: 600, ...(onClick ? { cursor: "pointer" } : {}) },
...(Array.isArray(sx) ? sx : [sx]),
]}
{...props}
/>
);
}