Skip to content

Commit

Permalink
added type for ReactElement in props.types.ts cashier
Browse files Browse the repository at this point in the history
  • Loading branch information
vinu-deriv committed Jun 28, 2022
1 parent 5560ecc commit b943dc5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/cashier/src/components/error-dialog/error-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Dialog } from '@deriv/components';
import { localize, Localize } from '@deriv/translations';
import { routes } from '@deriv/shared';
import { connect } from 'Stores/connect';
import { RootStore } from 'Types';
import { RootStore, TReactElement } from 'Types';

type TErrorDialogProps = {
disableApp: () => void;
Expand All @@ -21,7 +21,7 @@ type TSetDetails = {
cancel_button_text: undefined | string;
confirm_button_text: undefined | string;
onConfirm: undefined | (() => void);
message: undefined | string | React.ReactElement;
message: undefined | string | TReactElement;
has_close_icon?: boolean;
};

Expand Down
6 changes: 6 additions & 0 deletions packages/cashier/src/types/props.types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
export type TReactChangeEvent = React.ChangeEvent<HTMLInputElement>;

export type TReactChildren = React.ReactNode;

export type TReactMouseEvent = React.MouseEvent<HTMLElement>;

export type TReactFormEvent = React.FormEvent<HTMLInputElement>;

export type TReactElement = React.ReactElement;

0 comments on commit b943dc5

Please sign in to comment.