ProjectTypeChip.jsx
1 import { Chip } from "@mui/material"; 2 import { PROJECT_TYPE_COLORS } from "app/utils/constant"; 3 4 const DEFAULT_STYLE = { bg: "rgba(239,68,68,0.12)", color: "#ef4444" }; 5 6 export default function ProjectTypeChip({ type, ...props }) { 7 const style = PROJECT_TYPE_COLORS[type] || DEFAULT_STYLE; 8 return ( 9 <Chip 10 label={type} 11 size="small" 12 sx={{ 13 backgroundColor: style.bg, 14 color: style.color, 15 fontWeight: 600, 16 fontSize: "0.72rem", 17 textTransform: "uppercase", 18 height: 22, 19 }} 20 {...props} 21 /> 22 ); 23 }