UNPKG

@yamada-ui/calendar

Version:

Yamada UI calendar component

69 lines (66 loc) 1.72 kB
import { ButtonProps } from '@yamada-ui/button'; import { HTMLUIProps, FC } from '@yamada-ui/core'; import { CalendarHeaderProps } from './calendar-header.mjs'; import '@yamada-ui/icon'; import 'react'; import './use-calendar-header.mjs'; interface MonthTableProps extends HTMLUIProps<"table"> { tbody?: HTMLUIProps<"tbody">; td?: HTMLUIProps<"td">; th?: HTMLUIProps<"th">; thead?: HTMLUIProps<"thead">; tr?: HTMLUIProps<"tr">; } interface MonthOptions { /** * Props for calendar day button element. */ dayProps?: { component?: FC<DayProps>; } & ButtonProps; /** * Props for calendar header element. */ headerProps?: HTMLUIProps; /** * Props for calendar month table element. */ tableProps?: MonthTableProps; /** * Props for calendar weekday element. */ weekdayProps?: { component?: FC<WeekdayProps>; } & HTMLUIProps; } interface MonthProps extends HTMLUIProps, Omit<CalendarHeaderProps, "index" | "label">, MonthOptions { } declare const Month: FC<MonthProps>; interface WeekdayProps { index: number; weekday: string; } declare const Weekday: FC<WeekdayProps>; interface DayProps { col: number; date: Date; outside: boolean; row: number; selected: boolean; weekday: string; weekend: boolean; /** * @deprecated Use `outside` instead. */ isOutside?: boolean; /** * @deprecated Use `selected` instead. */ isSelected?: boolean; /** * @deprecated Use `weekend` instead. */ isWeekend?: boolean; } declare const Day: FC<DayProps>; export { Day, type DayProps, Month, type MonthProps, Weekday, type WeekdayProps };