plane/web/components/issues/issue-layouts/calendar/week-header.tsx
Anmol Singh Bhatia 48b55ef261
[WEB-327] chore: scrollbar implementation (#3703)
* style: custom scrollbar added

* chore: scrollbar added in issue layouts

* chore: scrollbar added in sidebar and workspace pages

* chore: calendar layout fix

* chore: project level scrollbar added

* chore: scrollbar added in command k modal

* fix: calendar layout alignment fix
2024-02-21 17:52:35 +05:30

35 lines
997 B
TypeScript

import { observer } from "mobx-react-lite";
// constants
import { DAYS_LIST } from "constants/calendar";
type Props = {
isLoading: boolean;
showWeekends: boolean;
};
export const CalendarWeekHeader: React.FC<Props> = observer((props) => {
const { isLoading, showWeekends } = props;
return (
<div
className={`relative grid divide-x-[0.5px] divide-custom-border-400 text-sm font-medium pr-[1rem] ${
showWeekends ? "grid-cols-7" : "grid-cols-5"
}`}
>
{isLoading && (
<div className="absolute h-[1.5px] w-3/4 animate-[bar-loader_2s_linear_infinite] bg-custom-primary-100" />
)}
{Object.values(DAYS_LIST).map((day) => {
if (!showWeekends && (day.shortTitle === "Sat" || day.shortTitle === "Sun")) return null;
return (
<div key={day.shortTitle} className="flex h-11 items-center justify-end bg-custom-background-90 px-4">
{day.shortTitle}
</div>
);
})}
</div>
);
});