UNPKG

@adaptui/react

Version:

Collection of headless components/hooks that are accessible, composable, customizable from low level to build your own UI & Design System powered by Reakit

26 lines (25 loc) 1.08 kB
import { HTMLAttributes, RefObject } from "react"; import { AriaButtonProps } from "@react-types/button"; import { DateValue, RangeCalendarProps } from "@react-types/calendar"; import { RangeCalendarBaseState } from "./range-calendar-base-state"; export declare function useRangeCalendarState({ state, ...props }: RangeCalendarStateProps): RangeCalendarState; export declare type RangeCalendarState = { /** Props for the calendar grouping element. */ calendarProps: HTMLAttributes<HTMLElement>; /** Props for the next button. */ nextButtonProps: AriaButtonProps; /** Props for the previous button. */ prevButtonProps: AriaButtonProps; /** A description of the visible date range, for use in the calendar title. */ title: string; /** * Reference for the calendar wrapper element within the cell inside the table */ ref: RefObject<HTMLElement>; }; export declare type RangeCalendarStateProps = RangeCalendarProps<DateValue> & { /** * Object returned by the `useSliderState` hook. */ state: RangeCalendarBaseState; };