@douyinfe/semi-ui
Version:
A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.
45 lines (44 loc) • 1.81 kB
TypeScript
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { PanelType } from '@douyinfe/semi-foundation/lib/cjs/datePicker/monthsGridFoundation';
interface NavigationProps {
forwardRef?: React.Ref<HTMLDivElement>;
monthText?: string;
density?: string;
onMonthClick?: (e: React.MouseEvent) => void;
onNextMonth?: () => void;
onPrevMonth?: () => void;
onNextYear?: () => void;
onPrevYear?: () => void;
navPrev?: React.ReactNode;
navNext?: React.ReactNode;
shouldBimonthSwitch?: boolean;
panelType?: PanelType;
}
export default class Navigation extends PureComponent<NavigationProps> {
static propTypes: {
monthText: PropTypes.Requireable<string>;
density: PropTypes.Requireable<string>;
onMonthClick: PropTypes.Requireable<(...args: any[]) => any>;
onNextMonth: PropTypes.Requireable<(...args: any[]) => any>;
onPrevMonth: PropTypes.Requireable<(...args: any[]) => any>;
onNextYear: PropTypes.Requireable<(...args: any[]) => any>;
onPrevYear: PropTypes.Requireable<(...args: any[]) => any>;
navPrev: PropTypes.Requireable<PropTypes.ReactNodeLike>;
navNext: PropTypes.Requireable<PropTypes.ReactNodeLike>;
shouldBimonthSwitch: PropTypes.Requireable<boolean>;
panelType: PropTypes.Requireable<"left" | "right">;
};
static defaultProps: {
monthText: string;
onMonthClick: (...args: any[]) => void;
onNextMonth: (...args: any[]) => void;
onPrevMonth: (...args: any[]) => void;
onNextYear: (...args: any[]) => void;
onPrevYear: (...args: any[]) => void;
};
navRef: React.RefObject<HTMLDivElement>;
constructor(props: NavigationProps);
render(): React.JSX.Element;
}
export {};