Skip to content

Commit

Permalink
chore: update types
Browse files Browse the repository at this point in the history
  • Loading branch information
allanfael authored and luancurti committed Jun 20, 2023
1 parent 2cba618 commit fb7dbf7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
40 changes: 20 additions & 20 deletions react-native-toast.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ declare module "@platformbuilders/react-native-toast" {
translateY: number;
};

export type ToastConfig = {
export type ToastConfigProps = {
fontFamily?: string;
textColor?: string;
backgroundColor?: {
Expand All @@ -33,39 +33,39 @@ declare module "@platformbuilders/react-native-toast" {
error?: string;
custom?: string;
};
icon: {
success: {
icon?: ImageSourcePropType;
icon?: {
success?: {
icon: ImageSourcePropType;
height?: number;
width?: number;
};
warning: {
icon?: ImageSourcePropType;
warning?: {
icon: ImageSourcePropType;
height?: number;
width?: number;
};
error: {
icon?: ImageSourcePropType;
error?: {
icon: ImageSourcePropType;
height?: number;
width?: number;
};
custom: {
icon?: ImageSourcePropType;
custom?: {
icon: ImageSourcePropType;
height?: number;
width?: number;
};
};
autoHide: {
success: boolean;
warning: boolean;
error: boolean;
custom: boolean;
autoHide?: {
success?: boolean;
warning?: boolean;
error?: boolean;
custom?: boolean;
};
showCloseButton: {
success: boolean;
warning: boolean;
error: boolean;
custom: boolean;
showCloseButton?: {
success?: boolean;
warning?: boolean;
error?: boolean;
custom?: boolean;
};
showIcon?: boolean;
};
Expand Down
8 changes: 4 additions & 4 deletions src/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,22 @@ export type ToastConfigProps = {
};
icon?: {
success?: {
icon?: ImageSourcePropType;
icon: ImageSourcePropType;
height?: number;
width?: number;
};
warning?: {
icon?: ImageSourcePropType;
icon: ImageSourcePropType;
height?: number;
width?: number;
};
error?: {
icon?: ImageSourcePropType;
icon: ImageSourcePropType;
height?: number;
width?: number;
};
custom?: {
icon?: ImageSourcePropType;
icon: ImageSourcePropType;
height?: number;
width?: number;
};
Expand Down

0 comments on commit fb7dbf7

Please sign in to comment.