22 lines
555 B
TypeScript
22 lines
555 B
TypeScript
/**
|
|
* rCal demo — tab switching and zoom controls (local state only, no WebSocket).
|
|
*
|
|
* Highlights the active tab when clicked. All tabs show the same
|
|
* calendar grid for now; this is purely visual feedback.
|
|
*/
|
|
|
|
const tabs = document.querySelectorAll<HTMLElement>("[data-cal-tab]");
|
|
|
|
tabs.forEach((tab) => {
|
|
tab.addEventListener("click", () => {
|
|
tabs.forEach((t) => {
|
|
t.style.background = "transparent";
|
|
t.style.color = "#94a3b8";
|
|
});
|
|
tab.style.background = "rgba(99,102,241,0.15)";
|
|
tab.style.color = "#818cf8";
|
|
});
|
|
});
|
|
|
|
export {};
|