@yamada-ui/calendar
Version:
Yamada UI calendar component
45 lines (42 loc) • 1.58 kB
text/typescript
import { IconButtonProps, ButtonProps } from '@yamada-ui/button';
import { HTMLUIProps, FC } from '@yamada-ui/core';
import { IconProps } from '@yamada-ui/icon';
import { ReactElement } from 'react';
import { UseCalendarHeaderProps } from './use-calendar-header.mjs';
interface CalendarHeaderOptions {
/**
* The label of the current calendar type.
*/
label: string;
/**
* Props for calendar control button element.
*/
controlProps?: Omit<CalendarControlProps, "operation">;
/**
* Props for calendar label button element.
*/
labelProps?: {
icon?: IconProps | ReactElement;
} & CalendarLabelProps;
/**
* Props for calendar next control button element.
*/
nextProps?: Omit<CalendarControlProps, "operation">;
/**
* Props for calendar previous control button element.
*/
prevProps?: Omit<CalendarControlProps, "operation">;
}
interface CalendarHeaderProps extends Omit<HTMLUIProps, "defaultValue" | "onChange" | "value">, CalendarHeaderOptions, UseCalendarHeaderProps {
}
declare const CalendarHeader: FC<CalendarHeaderProps>;
interface CalendarLabelProps extends ButtonProps {
}
interface CalendarLabelIconProps extends IconProps {
}
interface CalendarControlSharedProps extends Omit<CalendarControlProps, "operation"> {
}
interface CalendarControlProps extends IconButtonProps {
operation: "next" | "prev";
}
export { type CalendarControlProps, type CalendarControlSharedProps, CalendarHeader, type CalendarHeaderProps, type CalendarLabelIconProps, type CalendarLabelProps };