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>
31 lines
1.1 KiB
JavaScript
31 lines
1.1 KiB
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-[8px] sm:gap-[11px] md:gap-[14px] lg:gap-[16px] mt-[8px] sm:mt-[13px] md:mt-[19px] lg:mt-[24px] mb-[12px] sm:mb-[19px] md:mb-[25px] lg:lg:mb-[32px] "
|
|
>
|
|
<DoctorAvatar
|
|
doctor={doctor}
|
|
size={95}
|
|
className=" w-[40px] sm:w-[58px] md:w-[77px] lg:w-[95px] h-[40px] sm:h-[58px] md:h-[77px] lg:h-[95px] "
|
|
/>
|
|
<div className="flex flex-col items-start justify-center gap-[8px] sm:gap-[12px] md:gap-[16px] lg:gap-[20px]">
|
|
<p className="text-[var(--ap-text)] text-[14px] sm:text-[16px] md:text-[18px] lg:text-[20px] font-bold">
|
|
{doctor?.name}
|
|
</p>
|
|
<p className="text-[var(--ap-text-2)] text-[14px] md:text-[16px] font-medium">
|
|
تخصص: {expertiseText}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default Head;
|