UNPKG

@mantine/dates

Version:

Calendars, date and time pickers based on Mantine components

33 lines (32 loc) 1.62 kB
import { BoxProps, ElementProps, Factory, StylesApiProps } from '@mantine/core'; import { DateLabelFormat, DateStringValue } from '../../types'; import { CalendarHeaderSettings, CalendarHeaderStylesNames } from '../CalendarHeader'; import { MonthsListSettings, MonthsListStylesNames } from '../MonthsList'; export type YearLevelStylesNames = MonthsListStylesNames | CalendarHeaderStylesNames; export interface YearLevelBaseSettings extends MonthsListSettings { /** dayjs label format to display year label or a function that returns year label based on year value @default "YYYY" */ yearLabelFormat?: DateLabelFormat; } export interface YearLevelSettings extends YearLevelBaseSettings, CalendarHeaderSettings { } export interface YearLevelProps extends BoxProps, YearLevelSettings, Omit<StylesApiProps<YearLevelFactory>, 'classNames' | 'styles'>, ElementProps<'div'> { classNames?: Partial<Record<string, string>>; styles?: Partial<Record<string, React.CSSProperties>>; __staticSelector?: string; /** Displayed year value in `YYYY-MM-DD` format */ year: DateStringValue; /** `aria-label` for change level control */ levelControlAriaLabel?: string; /** Determines whether the calendar should take the full width of its container @default false */ fullWidth?: boolean; } export type YearLevelFactory = Factory<{ props: YearLevelProps; ref: HTMLDivElement; stylesNames: YearLevelStylesNames; }>; export declare const YearLevel: import("@mantine/core").MantineComponent<{ props: YearLevelProps; ref: HTMLDivElement; stylesNames: YearLevelStylesNames; }>;