components/appointment/ had every colour hard-coded, so the flow rendered identically in either theme even after the wiring was fixed. It now reads from CSS custom properties. These are not new colours. The :root values are byte-for-byte the hex codes that were already in the components — twenty-one files, mapped one to one — so light mode is unchanged. The dark values are derived from those same colours: surfaces and borders darkened, text inverted, and the two brand colours (the indigo and the orange) lightened rather than replaced, because both lose contrast against a dark surface at their original values. Verified in a headless browser with prefers-color-scheme forced dark: data-theme lands on <html> and --ap-surface resolves to #1b1b20 rather than white. Six one-off colours remain hard-coded — a success green, an error red and similar — each used exactly once and none of them a surface. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
29 lines
876 B
JavaScript
29 lines
876 B
JavaScript
import DoctorAvatar from "@/app/component/DoctorAvatar";
|
|
|
|
function Head({ doctor }) {
|
|
// تبدیل specialties array به string
|
|
const expertiseText = doctor?.specialties
|
|
?.map((exp) => exp.name)
|
|
.join("، ") || "";
|
|
|
|
return (
|
|
<div className="flex items-center justify-start gap-[12px]">
|
|
<DoctorAvatar
|
|
doctor={doctor}
|
|
size={56}
|
|
className=" w-[48px] sm:w-[51px] md:w-[54px] lg:w-[56px] h-[48px] sm:h-[51px] md:h-[54px] lg:h-[56px] "
|
|
/>
|
|
<div className="flex flex-col items-start justify-start gap-[8px]">
|
|
<h2 className="text-[var(--ap-text)] text-[12px] md:text-[14px] font-bold">
|
|
{doctor?.name}
|
|
</h2>
|
|
<h3 className="text-[var(--ap-muted)] text-[12px] md:text-[14px] font-medium">
|
|
تخصص: {expertiseText}
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default Head;
|