@fluentui/react-northstar
Version:
A themable React component library.
49 lines (48 loc) • 3.13 kB
TypeScript
import * as React from 'react';
import { Accessibility, DatepickerCalendarHeaderBehaviorProps } from '@fluentui/accessibility';
import { ICalendarStrings } from '../../utils/date-time-utilities';
import * as PropTypes from 'prop-types';
import { FluentComponentStaticProps, ShorthandValue, ComponentEventHandler } from '../../types';
import { ContentComponentProps, UIComponentProps } from '../../utils';
import { DatepickerCalendarHeaderActionProps } from './DatepickerCalendarHeaderAction';
import { TextProps } from '../Text/Text';
export interface DatepickerCalendarHeaderProps extends UIComponentProps, ContentComponentProps, Pick<ICalendarStrings, 'prevMonthAriaLabel' | 'nextMonthAriaLabel'> {
/** Accessibility behavior if overridden by the user. */
accessibility?: Accessibility<DatepickerCalendarHeaderBehaviorProps>;
/** Shorthand for text label. */
label?: ShorthandValue<TextProps>;
/** Action to happen on click on the previous button */
onPreviousClick?: ComponentEventHandler<DatepickerCalendarHeaderActionProps>;
/** Action to happen on click on the next button */
onNextClick?: ComponentEventHandler<DatepickerCalendarHeaderActionProps>;
/** Shorthand for the button that navigates to the previous calendar screen. */
previousButton?: ShorthandValue<DatepickerCalendarHeaderActionProps>;
/** Shorthand for the button that navigates to the next calendar screen. */
nextButton?: ShorthandValue<DatepickerCalendarHeaderActionProps>;
/** Decides whether next button is actionable._align_baseline. */
disabledNextButton?: boolean;
/** Decides whether previous button is actionable._align_baseline. */
disabledPreviousButton?: boolean;
}
export declare type DatepickerCalendarHeaderStylesProps = never;
export declare const datepickerCalendarHeaderClassName = "ui-datepicker__calendarheader";
/**
* A DatepickerCalendarHeader is used to display header block above calendar grid.
*/
export declare const DatepickerCalendarHeader: (<TExtendedElementType extends React.ElementType<any> = "div">(props: React.RefAttributes<HTMLDivElement> & Omit<import("@fluentui/react-bindings").PropsOfElement<TExtendedElementType>, "as" | keyof DatepickerCalendarHeaderProps> & {
as?: TExtendedElementType;
} & DatepickerCalendarHeaderProps) => JSX.Element) & {
propTypes?: React.WeakValidationMap<DatepickerCalendarHeaderProps> & {
as: React.Requireable<string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>;
};
contextTypes?: PropTypes.ValidationMap<any>;
defaultProps?: Partial<DatepickerCalendarHeaderProps & {
as: "div";
}>;
displayName?: string;
readonly __PRIVATE_PROPS?: React.RefAttributes<HTMLDivElement> & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
ref?: React.Ref<HTMLDivElement>;
}, "as" | keyof DatepickerCalendarHeaderProps> & {
as?: "div";
} & DatepickerCalendarHeaderProps;
} & FluentComponentStaticProps<DatepickerCalendarHeaderProps>;