Skip to content

Commit

Permalink
refactor: after review
Browse files Browse the repository at this point in the history
  • Loading branch information
PKulkoRaccoonGang committed May 2, 2023
1 parent f6d3b56 commit 48a0248
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/DataTable/CardView.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface CardViewProps {
skeletonCardCount?: number;
}

declare function CardView<T>(props: CardViewProps): JSX.Element;
declare function CardView(props: CardViewProps): JSX.Element;

export default CardView;

2 changes: 1 addition & 1 deletion src/DataTable/TableRow.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ export interface TableRowProps {
};
}

declare function TableRow({ row }: TableRowProps): JSX.Element;
declare function TableRow(props: TableRowProps): JSX.Element;

export default TableRow;
2 changes: 1 addition & 1 deletion src/DataTable/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export interface DataTableProps {
manualSortBy?: boolean;
isExpandable?: boolean;
renderRowSubComponent?: (row: number, index: number) => React.ReactNode;
bulkActions?: BulkActionProp[] | (() => BulkActionProp[]) | React.ReactElement;
bulkActions?: BulkActionProp[];
tableActions?: TableActionType[];
numBreakoutFilters?: 1 | 2 | 3 | 4;
initialTableOptions?: object;
Expand Down
4 changes: 2 additions & 2 deletions src/Dropzone/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export interface DropzoneProps {
accept?: { [key: string]: string[] };
maxSize?: number;
minSize?: number;
onUploadProgress?: (percentageUploaded: number, progressEvent: ProgressEvent) => void;
onUploadCancel?: (response: Response) => void;
onUploadProgress?: (percentageUploaded: number, progressEvent: AbortSignal) => void;
onUploadCancel?: () => void;
onProcessUpload: (params: {
fileData: object;
requestConfig: object;
Expand Down
2 changes: 1 addition & 1 deletion src/Form/FormRadioSetContext.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface FormRadioSetContextValue extends RadioControlProps {
getRadioControlProps: (props: RadioControlProps) => RadioControlProps;
}

export interface FormRadioSetContextProviderProps extends Omit<FormRadioSetContextValue, 'getRadioControlProps'> {
export interface FormRadioSetContextProviderProps extends FormRadioSetContextValue {
children: React.ReactNode;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Icon/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface IconProps {
size?: 'xs' | 'sm' | 'md' | 'lg';
className?: string;
hidden?: boolean;
screenReaderText?: string | React.ReactNode;
screenReaderText?: React.ReactNode;
}

declare const Icon: React.FC<IconProps>;
Expand Down
2 changes: 1 addition & 1 deletion src/IconButtonToggle/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { IconButtonProps } from '../IconButton';
export interface IconButtonToggleProps {
activeValue?: string;
onChange?: (value: string) => void;
children: React.ReactElement<IconButtonProps>[];
children: React.ReactElement<IconButtonProps>;
}

declare const IconButtonToggle: React.FC<IconButtonToggleProps>;
Expand Down
4 changes: 2 additions & 2 deletions src/Modal/ModalLayer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export interface ModalLayerProps {
zIndex?: number;
}

export function ModalBackdrop({ onClick }: { onClick?: () => void }): JSX.Element;
export function ModalBackdrop(props: { onClick?: () => void }): JSX.Element;

export function ModalContentContainer({ children }: { children?: React.ReactNode }): JSX.Element;
export function ModalContentContainer(props: { children?: React.ReactNode }): JSX.Element;

export default function ModalLayer(props: ModalLayerProps): JSX.Element;
2 changes: 1 addition & 1 deletion src/Overlay/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface OverlayProps extends React.HTMLAttributes<HTMLDivElement> {
show: boolean;
onHide: () => void;
placement?: Placement;
container?: Element | (() => Element | null) | null;
container?: React.ReactElement | (() => React.ReactElement | null) | null;
flip?: boolean;
popperConfig?: Object;
rootClose?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useIndexOfLastVisibleChild.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import React from 'react';
declare const useIndexOfLastVisibleChild: (
containerElementRef: React.RefObject<Element>,
overflowElementRef?: React.RefObject<Element>
) => number[];
) => number;

export default useIndexOfLastVisibleChild;
4 changes: 2 additions & 2 deletions src/hooks/useWindowSize.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export interface WindowSizeTypes {
width: number | undefined;
height: number | undefined;
width?: number;
height?: number;
}

declare function useWindowSize(): WindowSizeTypes;
Expand Down

0 comments on commit 48a0248

Please sign in to comment.