improvement: badge & card components colour pallete updated so their text become more readable in light mode.
This commit is contained in:
@@ -4,6 +4,7 @@ import { useState } from 'react';
|
||||
import { Pencil } from 'lucide-react';
|
||||
import { Button } from '@/components/ui/common/Button';
|
||||
import { Badge } from '@/components/ui/common/Badge';
|
||||
import { Card } from '@/components/ui/common/Card';
|
||||
import { Table } from '@/components/ui/common/Table';
|
||||
import { SearchBar } from '@/components/ui/common/SearchBar';
|
||||
import { useAuth } from '@/lib/hooks/useAuth';
|
||||
@@ -195,19 +196,19 @@ export default function BillingPage() {
|
||||
}
|
||||
function StatCard({ title, count, amount, color }: StatCardProps) {
|
||||
const colors: Record<StatCardColor, string> = {
|
||||
blue: 'bg-sky-900/30 text-sky-300 border-sky-700/60',
|
||||
yellow: 'bg-amber-900/30 text-amber-300 border-amber-700/60',
|
||||
green: 'bg-emerald-900/30 text-emerald-300 border-emerald-700/60',
|
||||
red: 'bg-red-950/30 text-red-300 border-red-700/60',
|
||||
blue: '!bg-purpose-visit-bg !text-purpose-visit-fg !border-purpose-visit-border',
|
||||
yellow: '!bg-badge-warning-bg !text-badge-warning-fg !border-badge-warning-border',
|
||||
green: '!bg-badge-success-bg !text-badge-success-fg !border-badge-success-border',
|
||||
red: '!bg-badge-danger-bg !text-badge-danger-fg !border-badge-danger-border',
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={`p-4 rounded-xl border ${colors[color]}`}>
|
||||
<p className="text-sm font-medium opacity-80">{title}</p>
|
||||
<Card className={`${colors[color]}`}>
|
||||
<p className="text-sm font-medium">{title}</p>
|
||||
<p className="text-2xl font-bold mt-1">{count}</p>
|
||||
<p className="text-sm font-medium mt-1">
|
||||
${amount.toLocaleString()}
|
||||
</p>
|
||||
</div>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import Link from 'next/link';
|
||||
import { useAuth } from '@/lib/hooks/useAuth';
|
||||
import { Card } from '@/components/ui/common/Card';
|
||||
|
||||
export default function TodayPage() {
|
||||
const { currentOrganization } = useAuth();
|
||||
@@ -27,29 +28,26 @@ export default function TodayPage() {
|
||||
)}
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4">
|
||||
<Card title="Today's Appointments" value="12" sub="Monday 2/5/2026" />
|
||||
<Card title="Active Patients" value="675" />
|
||||
<Card title="New Lab Case" value="5" sub="35 ↑" />
|
||||
<Card title="Today invoices" value="1200$" sub="21,300 $" />
|
||||
<Card>
|
||||
<p className="text-sm text-card-muted">Today's Appointments</p>
|
||||
<p className="text-2xl font-semibold mt-2">12</p>
|
||||
<p className="text-xs text-text-muted mt-1">Monday 2/5/2026</p>
|
||||
</Card>
|
||||
<Card>
|
||||
<p className="text-sm text-card-muted">Active Patients</p>
|
||||
<p className="text-2xl font-semibold mt-2">675</p>
|
||||
</Card>
|
||||
<Card>
|
||||
<p className="text-sm text-card-muted">New Lab Case</p>
|
||||
<p className="text-2xl font-semibold mt-2">5</p>
|
||||
<p className="text-xs text-text-muted mt-1">35 ↑</p>
|
||||
</Card>
|
||||
<Card>
|
||||
<p className="text-sm text-card-muted">Today invoices</p>
|
||||
<p className="text-2xl font-semibold mt-2">1200$</p>
|
||||
<p className="text-xs text-text-muted mt-1">21,300 $</p>
|
||||
</Card>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function Card({
|
||||
title,
|
||||
value,
|
||||
sub,
|
||||
}: {
|
||||
title: string;
|
||||
value: string;
|
||||
sub?: string;
|
||||
}) {
|
||||
return (
|
||||
<div className="surface-card p-4">
|
||||
<p className="text-sm text-text-secondary">{title}</p>
|
||||
<p className="text-2xl font-semibold mt-2">{value}</p>
|
||||
{sub && <p className="text-xs text-text-muted mt-1">{sub}</p>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user