Skip to content

Commit

Permalink
refactor: promote the calendar composable to be a full field optionally
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Feb 16, 2025
1 parent c7244b5 commit 949ebda
Show file tree
Hide file tree
Showing 6 changed files with 267 additions and 210 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/useCalendar/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './useCalendar';
export * from './types';
export * from './useCalendarCell';
export * from './useCalendarPanel';
export * from './useCalendarView';
4 changes: 2 additions & 2 deletions packages/core/src/useCalendar/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface CalendarYearCell {

export type CalendarCellProps = CalendarDayCell | CalendarMonthCell | CalendarYearCell;

export type CalendarPanelType = 'weeks' | 'months' | 'years';
export type CalendarViewType = 'weeks' | 'months' | 'years';

export interface CalendarContext {
locale: Ref<string>;
Expand All @@ -49,5 +49,5 @@ export interface CalendarContext {
getMaxDate: () => Maybe<ZonedDateTime>;
getFocusedDate: () => ZonedDateTime;
setFocusedDate: (date: ZonedDateTime) => void;
setDate: (date: ZonedDateTime, panel?: CalendarPanelType) => void;
setDate: (date: ZonedDateTime, view?: CalendarViewType) => void;
}
Loading

0 comments on commit 949ebda

Please sign in to comment.