- "frontend/src/pages/ReviewQueue.tsx" - "frontend/src/pages/MomentDetail.tsx" - "frontend/src/components/StatusBadge.tsx" - "frontend/src/components/ModeToggle.tsx" - "frontend/src/App.tsx" - "frontend/src/App.css" GSD-Task: S04/T03
19 lines
449 B
TypeScript
19 lines
449 B
TypeScript
/**
|
|
* Reusable status badge with color coding.
|
|
*
|
|
* Maps review_status values to colored pill shapes:
|
|
* pending → amber, approved → green, edited → blue, rejected → red
|
|
*/
|
|
|
|
interface StatusBadgeProps {
|
|
status: string;
|
|
}
|
|
|
|
export default function StatusBadge({ status }: StatusBadgeProps) {
|
|
const normalized = status.toLowerCase();
|
|
return (
|
|
<span className={`badge badge--${normalized}`}>
|
|
{normalized}
|
|
</span>
|
|
);
|
|
}
|