From 1a73b34055e1027a5d0e8dfadd07fd564eb05fee Mon Sep 17 00:00:00 2001 From: Nikhil Tomar Date: Thu, 6 Jun 2024 16:55:38 +0530 Subject: [PATCH] feat: exports typescript interface --- packages/react/src/components/DatePicker/DatePicker.tsx | 2 +- packages/react/src/components/DatePicker/index.tsx | 4 ++-- .../react/src/components/DatePickerInput/DatePickerInput.tsx | 2 +- packages/react/src/components/DatePickerInput/index.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/react/src/components/DatePicker/DatePicker.tsx b/packages/react/src/components/DatePicker/DatePicker.tsx index f3e62d0564b0..4352321c46be 100644 --- a/packages/react/src/components/DatePicker/DatePicker.tsx +++ b/packages/react/src/components/DatePicker/DatePicker.tsx @@ -201,7 +201,7 @@ export type CalRef = { plugins: []; clickOpens: any; }; -interface DatePickerProps { +export interface DatePickerProps { /** * Flatpickr prop passthrough enables direct date input, and when set to false, * we must clear dates manually by resetting the value prop to empty string making it a controlled input. diff --git a/packages/react/src/components/DatePicker/index.tsx b/packages/react/src/components/DatePicker/index.tsx index 84361fd49345..e94a69168f2f 100644 --- a/packages/react/src/components/DatePicker/index.tsx +++ b/packages/react/src/components/DatePicker/index.tsx @@ -5,11 +5,11 @@ * LICENSE file in the root directory of this source tree. */ -import DatePicker from './DatePicker'; +import DatePicker, { type DatePickerProps } from './DatePicker'; export { default as DatePickerSkeleton, type DatePickerSkeletonProps, } from './DatePicker.Skeleton'; export default DatePicker; -export { DatePicker }; +export { DatePicker, type DatePickerProps }; diff --git a/packages/react/src/components/DatePickerInput/DatePickerInput.tsx b/packages/react/src/components/DatePickerInput/DatePickerInput.tsx index 730326432d91..4575042fcb6b 100644 --- a/packages/react/src/components/DatePickerInput/DatePickerInput.tsx +++ b/packages/react/src/components/DatePickerInput/DatePickerInput.tsx @@ -28,7 +28,7 @@ export type ReactNodeLike = export type func = (...args: any[]) => any; -interface DatePickerInputProps +export interface DatePickerInputProps extends Omit, ExcludedAttributes> { /** * The type of the date picker: diff --git a/packages/react/src/components/DatePickerInput/index.ts b/packages/react/src/components/DatePickerInput/index.ts index f2b6abc92631..4fa8ed3f9086 100644 --- a/packages/react/src/components/DatePickerInput/index.ts +++ b/packages/react/src/components/DatePickerInput/index.ts @@ -5,6 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -import DatePickerInput from './DatePickerInput'; +import DatePickerInput, { type DatePickerInputProps } from './DatePickerInput'; export default DatePickerInput; -export { DatePickerInput }; +export { DatePickerInput, type DatePickerInputProps };