mirror of
https://github.com/skidoodle/budgetable.git
synced 2025-02-15 03:39:14 +01:00
Refactor: Break down single table component into multiple modular components
This commit is contained in:
parent
8c9688017b
commit
95380493cb
33 changed files with 1562 additions and 6642 deletions
18
src/components/status-badge.tsx
Normal file
18
src/components/status-badge.tsx
Normal file
|
@ -0,0 +1,18 @@
|
|||
import { Badge } from "@/components/ui/badge";
|
||||
|
||||
interface StatusBadgeProps {
|
||||
status: "Paid" | "Unpaid";
|
||||
toggleStatus: () => void;
|
||||
}
|
||||
|
||||
const StatusBadge: React.FC<StatusBadgeProps> = ({ status, toggleStatus }) => (
|
||||
<Badge
|
||||
variant={status === "Paid" ? "destructive" : "secondary"}
|
||||
className="cursor-pointer"
|
||||
onClick={toggleStatus}
|
||||
>
|
||||
{status}
|
||||
</Badge>
|
||||
);
|
||||
|
||||
export default StatusBadge;
|
Loading…
Add table
Add a link
Reference in a new issue