Skip to content

Commit 26e3328

Browse files
added barrel export of GenerateConfigs
and export of GenerateConfig type
1 parent e7e1f2f commit 26e3328

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

src/generate/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,8 @@ export type GenerateConfig<DateType> = {
4444
getShortMonths?: (locale: string) => string[];
4545
};
4646
};
47+
48+
export { default as dateFnsGenerateConfig } from './dateFns';
49+
export { default as dayjsGenerateConfig } from './dayjs';
50+
export { default as luxonGenerateConfig } from './luxon';
51+
export { default as momentGenerateConfig } from './moment';

src/index.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,17 @@ import type { PickerRef, SharedTimeProps } from './interface';
3131
import RangePicker, { type RangePickerProps } from './PickerInput/RangePicker';
3232
import Picker, { type BasePickerProps, type PickerProps } from './PickerInput/SinglePicker';
3333
import PickerPanel, { type BasePickerPanelProps, type PickerPanelProps } from './PickerPanel';
34-
import momentGenerateConfig from './generate/moment';
35-
import dayjsGenerateConfig from './generate/dayjs';
36-
import dateFnsGenerateConfig from './generate/dateFns';
37-
import luxonGenerateConfig from './generate/luxon';
34+
import { dateFnsGenerateConfig, dayjsGenerateConfig, luxonGenerateConfig, momentGenerateConfig, type GenerateConfig } from './generate';
3835

3936
export {
40-
Picker,
41-
RangePicker,
42-
PickerPanel,
43-
momentGenerateConfig,
44-
dayjsGenerateConfig,
4537
dateFnsGenerateConfig,
38+
dayjsGenerateConfig,
39+
GenerateConfig,
4640
luxonGenerateConfig,
41+
momentGenerateConfig,
42+
Picker,
43+
PickerPanel,
44+
RangePicker,
4745
};
4846
export type {
4947
RangePickerProps,

0 commit comments

Comments
 (0)