Skip to content

Commit

Permalink
chore: 调整 datepicker 导出
Browse files Browse the repository at this point in the history
  • Loading branch information
honkinglin committed May 9, 2022
1 parent 07aa463 commit 1de7101
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/date-picker/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import useConfig from '../_util/useConfig';
import { StyledProps } from '../common';
import { TdDatePickerProps } from './type';
import SelectInput from '../select-input';
import DatePanel from './panel/DatePickerPanel';
import DatePickerPanel from './panel/DatePickerPanel';
import useSingle from './hooks/useSingle';
import useFormat from './hooks/useFormat';
import { subtractMonth, addMonth, extractTimeObj } from '../_common/js/date-picker/utils-new';
Expand Down Expand Up @@ -213,7 +213,7 @@ const DatePicker = forwardRef<HTMLDivElement, DatePickerProps>((props, ref) => {
popupProps={popupProps}
inputProps={inputProps}
popupVisible={popupVisible}
panel={<DatePanel {...panelProps} />}
panel={<DatePickerPanel {...panelProps} />}
/>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions src/date-picker/DateRangePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import useConfig from '../_util/useConfig';
import { StyledProps } from '../common';
import { TdDateRangePickerProps } from './type';
import { RangeInputPopup } from '../range-input';
import DateRangePanel from './panel/DateRangePickerPanel';
import DateRangePickerPanel from './panel/DateRangePickerPanel';
import useRange from './hooks/useRange';
import useFormat from './hooks/useFormat';
import { subtractMonth, addMonth, extractTimeObj } from '../_common/js/date-picker/utils-new';
Expand Down Expand Up @@ -311,7 +311,7 @@ const DateRangePicker = forwardRef<HTMLDivElement, DateRangePickerProps>((props,
popupProps={popupProps}
rangeInputProps={rangeInputProps}
popupVisible={popupVisible}
panel={<DateRangePanel {...panelProps} />}
panel={<DateRangePickerPanel {...panelProps} />}
/>
</div>
);
Expand Down
8 changes: 4 additions & 4 deletions src/date-picker/panel/DatePickerPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface DatePickerPanelProps extends TdDatePickerProps, StyledProps {
onTimePickerChange?: TdTimePickerProps['onChange'];
}

const DatePanel = (props: DatePickerPanelProps) => {
const DatePickerPanel = (props: DatePickerPanelProps) => {
const { classPrefix, datePicker: globalDatePickerConfig } = useConfig();
const panelName = `${classPrefix}-date-picker__panel`;
const {
Expand Down Expand Up @@ -93,12 +93,12 @@ const DatePanel = (props: DatePickerPanelProps) => {
);
};

DatePanel.displayName = 'DatePanel';
DatePickerPanel.displayName = 'DatePickerPanel';

DatePanel.defaultProps = {
DatePickerPanel.defaultProps = {
mode: 'date',
enableTimePicker: false,
presetsPlacement: 'bottom',
};

export default DatePanel;
export default DatePickerPanel;
8 changes: 4 additions & 4 deletions src/date-picker/panel/DateRangePickerPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface DateRangePickerPanelProps extends TdDateRangePickerProps, Style
onTimePickerChange?: TdTimePickerProps['onChange'];
}

const DateRangePanel = (props: DateRangePickerPanelProps) => {
const DateRangePickerPanel = (props: DateRangePickerPanelProps) => {
const { classPrefix, datePicker: globalDatePickerConfig } = useConfig();
const panelName = `${classPrefix}-date-range-picker__panel`;
const {
Expand Down Expand Up @@ -176,12 +176,12 @@ const DateRangePanel = (props: DateRangePickerPanelProps) => {
);
};

DateRangePanel.displayName = 'DateRangePanel';
DateRangePickerPanel.displayName = 'DateRangePickerPanel';

DateRangePanel.defaultProps = {
DateRangePickerPanel.defaultProps = {
mode: 'date',
enableTimePicker: false,
presetsPlacement: 'bottom',
};

export default DateRangePanel;
export default DateRangePickerPanel;

0 comments on commit 1de7101

Please sign in to comment.