dropdown+scheduler

This commit is contained in:
wrzesinski-hubert
2020-07-20 17:53:50 +02:00
parent 5b24b5fd59
commit f95c8d450d
12 changed files with 204 additions and 123 deletions

View File

@ -0,0 +1,38 @@
import React from "react";
interface SchedulerEventProps {
events: Array<number>;
colIndex: number;
}
export const SchedulerEvent = ({ events, colIndex }: SchedulerEventProps) => {
const handleEventClick = (e: React.MouseEvent) => {
const eventDiv = e.target as HTMLDivElement;
eventDiv.style.backgroundColor = "#1547C5";
};
return (
<>
{events.map((event, index) => (
<div
id={`eventCol${colIndex}eventRow${index}`}
style={{
position: "absolute",
top: 80 * index + 5,
left:5,
backgroundColor: "#839FE6",
color: "white",
borderRadius: 5,
padding:5,
width: "80%",
height: 60,
display: "none",
}}
onClick={handleEventClick}
>
:)
</div>
))}
</>
);
};