Loading...
Installation
Props
Prop | Type | Default | Description |
---|---|---|---|
initialEvents | EventItem[] | [] | Array of initial events |
onEventsChange | (events: EventItem[]) => void | - | Callback when events change |
showAddForm | boolean | true | Whether to show the add form |
Usage
import {
OrigamiFoldOutCalendar,
EventItem,
} from "@/components/ui/origami-fold-out-calendar";
const events: EventItem[] = [
{
id: 1,
title: "Team Meeting",
date: new Date(),
},
];
function MyCalendar() {
const [events, setEvents] = React.useState<EventItem[]>([]);
return (
<OrigamiFoldOutCalendar initialEvents={events} onEventsChange={setEvents} />
);
}