From 5757718b098bc5401072ffc15645ce80655503fd Mon Sep 17 00:00:00 2001 From: Julie Wongbandue Date: Fri, 14 Jul 2023 13:54:39 -0400 Subject: [PATCH] Export component types --- src/components/Badge/Badge.types.ts | 2 +- src/components/Panel/Panel.types.ts | 2 +- src/components/Path/Path.tsx | 5 ++- src/components/Sidebar/Sidebar.types.ts | 4 -- .../inputs/FileUpload/FileUpload.tsx | 2 +- src/types/index.ts | 43 +++++++++++++++++++ 6 files changed, 50 insertions(+), 8 deletions(-) create mode 100644 src/types/index.ts diff --git a/src/components/Badge/Badge.types.ts b/src/components/Badge/Badge.types.ts index 21aaadcc3..2807f44a6 100755 --- a/src/components/Badge/Badge.types.ts +++ b/src/components/Badge/Badge.types.ts @@ -23,7 +23,7 @@ export type Props = IrisProps< export type DOMElement = HTMLSpanElement | HTMLAnchorElement; -type Format = +export type Format = | 'alum' | 'beta' | 'business' diff --git a/src/components/Panel/Panel.types.ts b/src/components/Panel/Panel.types.ts index caeb7a9b4..8100d4589 100644 --- a/src/components/Panel/Panel.types.ts +++ b/src/components/Panel/Panel.types.ts @@ -58,4 +58,4 @@ export type Props = IrisProps<{ screen?: boolean; }>; -type Resize = { min: number; max: number; current: number }; +export type Resize = { min: number; max: number; current: number }; diff --git a/src/components/Path/Path.tsx b/src/components/Path/Path.tsx index c28e38402..9e61583b8 100644 --- a/src/components/Path/Path.tsx +++ b/src/components/Path/Path.tsx @@ -10,7 +10,10 @@ export const Path = withIris( PathComponent ); -type Props = IrisProps<{ children: ReactElement[] }, HTMLDivElement>; +export type Props = IrisProps< + { children: ReactElement[] }, + HTMLDivElement +>; Path.Link = Link; Path.Current = Current; diff --git a/src/components/Sidebar/Sidebar.types.ts b/src/components/Sidebar/Sidebar.types.ts index d8a29c76e..fa869b0dd 100644 --- a/src/components/Sidebar/Sidebar.types.ts +++ b/src/components/Sidebar/Sidebar.types.ts @@ -30,10 +30,6 @@ export interface ItemPropsExtrinsic { onClick?: MouseEventHandler; } -export type ItemExtrinsic = ( - props: ItemPropsExtrinsic -) => JSX.Element; - export type ItemPropsIntrinsic = ItemPropsExtrinsic & { attach: Props['attach']; onClick: MouseEventHandler; diff --git a/src/components/inputs/FileUpload/FileUpload.tsx b/src/components/inputs/FileUpload/FileUpload.tsx index a5cf53dec..ba7245be7 100755 --- a/src/components/inputs/FileUpload/FileUpload.tsx +++ b/src/components/inputs/FileUpload/FileUpload.tsx @@ -8,7 +8,7 @@ export const FileUpload = withIris( FileUploadComponent ); -type Props = IrisInputProps; +export type Props = IrisInputProps; function FileUploadComponent({ children, diff --git a/src/types/index.ts b/src/types/index.ts new file mode 100644 index 000000000..3b42ca95a --- /dev/null +++ b/src/types/index.ts @@ -0,0 +1,43 @@ +export { Props as AvatarProps, Size as AvatarSizeProps } from '../components/Avatar/Avatar.types'; +export { Props as BadgeProps, Format as BadgeFormatProps } from '../components/Badge/Badge.types'; +export { Props as ButtonProps } from '../components/Button/Button.types'; +export { Props as CardProps } from '../components/Card/Card'; +export { Props as CardCategoryProps } from '../components/CardCategory/CardCategory'; +export { Props as CheckboxProps } from '../components/inputs/Checkbox/Checkbox'; +export { Props as CheckboxSetProps } from '../components/inputs/Checkbox/CheckboxSet.types'; +export { Props as ColorSelect2Props } from '../components/inputs/ColorSelect2/ColorSelect2.types'; +export { Props as CopyFieldProps } from '../components/inputs/CopyField/CopyField'; +export { Props as CalendarProps } from '../components/inputs/Dates/Calendar/Calendar'; +export { Props as DateRangeProps } from '../components/inputs/Dates/DateRange/DateRange.types'; +export { Props as DateSelectProps } from '../components/inputs/Dates/DateSelect/DateSelect'; +export { Props as DropZoneProps } from '../components/inputs/Dropzone/Dropzone.types'; +export { Props as FileUploadProps } from '../components/inputs/FileUpload/FileUpload'; +export { Props as InputProps } from '../components/inputs/Input/Input.types'; +export { Props as PasswordProps } from '../components/inputs/Password/Password'; +export { Props as RadioProps } from '../components/inputs/Radio/Radio'; +export { Props as RadioSetProps } from '../components/inputs/Radio/RadioSet'; +export { Props as SearchProps } from '../components/inputs/Search/Search'; +export { Props as SelectProps } from '../components/inputs/Select/Select.types'; +export { State as SelectState } from '../components/inputs/Select/Select.state'; +export { Props as SliderProps } from '../components/inputs/Slider/Slider.types'; +export { Props as TextAreaProps } from '../components/inputs/TextArea/TextArea.types'; +export { Props as ToggleProps } from '../components/inputs/Toggle/Toggle'; +export { Props as WithCharacterCountProps } from '../components/inputs/withCharacterCount/withCharacterCount.types'; +export { Props as LoaderCircularProps } from '../components/LoaderCircular/LoaderCircular.types'; +export { Props as MenuProps } from '../components/Menu/Menu'; +export { Minors as MenuMinorProps } from '../components/Menu/Menu.minors'; +export { Props as ModalProps } from '../components/Modal/Modal.types'; +export { Props as NoticeProps } from '../components/Notice/Notice'; +export { Props as NotificationProps } from '../components/Notification/Notification'; +export { Props as PaginationProps, PaginationChangeEvent } from '../components/Pagination/Pagination.types'; +export { Props as PanelProps, Resize as PanelResize } from '../components/Panel/Panel.types'; +export { Minors as PathMinorProps } from '../components/Path/Path.minors'; +export { Props as PathProps } from '../components/Path/Path'; +export { Props as PopOverProps } from '../components/PopOver/PopOver.types'; +export { Props as ProgressProps } from '../components/Progress/Progress'; +export { Props as RibbonProps } from '../components/Ribbon/Ribbon.types'; +export { Props as SidebarProps, ItemPropsIntrinsic as SidebarItemProps, Minors as SidebarMinors } from '../components/Sidebar/Sidebar.types'; +export { Props as TabsProps, PanelProps as TabsPanelProps } from '../components/Tabs/Tabs.types'; +export { Props as TagProps, Sizes as TagSizes } from '../components/Tag/Tag.types'; +export { Props as TipProps } from '../components/Tip/Tip.types'; +export { Props as TourPointProps } from '../components/TourPoint/TourPoint.types';