Loading...
Installation
Props
Prop | Type | Default | Description |
---|---|---|---|
initialEvents | Event[] | [] | Array of initial events |
onEventsChange | (events: Event[]) => void | - | Callback when events change |
Usage
import {
PriorityPyramidCalendar,
Event,
} from "@/components/ui/priority-pyramid-calendar";
const events: Event[] = [
{
id: 1,
title: "High Priority Task",
date: new Date(),
priority: 1,
},
];
function MyCalendar() {
const [events, setEvents] = React.useState<Event[]>([]);
return (
<PriorityPyramidCalendar
initialEvents={events}
onEventsChange={setEvents}
/>
);
}