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>
28 lines
966 B
JavaScript
28 lines
966 B
JavaScript
import DateTime from "@/app/component/date/dateTime";
|
|
|
|
function Hour({ doctor, setStep, date, isStep, setSelectedSlot, setSelectedDate, serviceMode = false, selectedServiceUuids = [], clinicUuid = null, selectedLocation = null }) {
|
|
return (
|
|
<div className="flex relative mt-[24px] flex-col items-start gap-[12px] justify-start">
|
|
<p className="text-[var(--ap-text)] text-[14px] md:text-[16px] font-bold">
|
|
2. انتخاب ساعت
|
|
</p>
|
|
<DateTime
|
|
date={date}
|
|
doctor={doctor}
|
|
setStep={setStep}
|
|
setSelectedSlot={setSelectedSlot}
|
|
setSelectedDate={setSelectedDate}
|
|
serviceMode={serviceMode}
|
|
selectedServiceUuids={selectedServiceUuids}
|
|
clinicUuid={clinicUuid}
|
|
selectedLocation={selectedLocation}
|
|
/>
|
|
{!isStep && (
|
|
<div className="absolute left-0 top-0 w-full h-full bg-[rgba(255,255,255,0.84)]"></div>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default Hour;
|