@codeworker.br/govbr-tw-react
Version:
Biblioteca de componentes React usando Tailwind CSS que implementa o Padrão Digital de Governo.
25 lines (24 loc) • 901 B
TypeScript
import type { ComponentPropsWithoutRef } from "react";
import type { VariantProps } from "class-variance-authority";
import { calendarVariants } from "./variants";
type CalendarBaseProps = Omit<ComponentPropsWithoutRef<"div">, "onChange" | "defaultValue">;
export interface CalendarProps extends CalendarBaseProps, VariantProps<typeof calendarVariants> {
value?: Date;
defaultValue?: Date;
onChange?: (date: Date) => void;
minDate?: Date;
maxDate?: Date;
disabledDate?: (date: Date) => boolean;
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
locale?: string;
yearRange?: {
start: number;
end: number;
};
translations?: {
weekdaysShort?: string[];
months?: string[];
};
}
declare const Calendar: import("react").ForwardRefExoticComponent<CalendarProps & import("react").RefAttributes<HTMLDivElement>>;
export default Calendar;