Skip to content

Commit

Permalink
Closes #521 - Update SnackbarContent to accept ref type
Browse files Browse the repository at this point in the history
  • Loading branch information
iamhosseindhv committed Oct 16, 2022
1 parent 2d7d1e7 commit 1c6a44c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@ export declare function useSnackbar(): ProviderContext;
export declare const enqueueSnackbar: ProviderContext['enqueueSnackbar'];
export declare const closeSnackbar: ProviderContext['closeSnackbar'];

export declare const SnackbarContent: (props: SnackbarContentProps) => JSX.Element;
export declare const SnackbarContent: (
props: SnackbarContentProps & React.RefAttributes<HTMLDivElement>
) => React.ReactElement<any, any>;

export declare const Transition: React.JSXElementConstructor<TransitionComponentProps>;
35 changes: 30 additions & 5 deletions typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8213,15 +8213,40 @@
"isExported": true
},
"type": {
"type": "reference",
"id": 318,
"name": "SnackbarContentProps"
"type": "intersection",
"types": [
{
"type": "reference",
"id": 318,
"name": "SnackbarContentProps"
},
{
"type": "reference",
"typeArguments": [
{
"type": "reference",
"name": "HTMLDivElement"
}
],
"name": "RefAttributes"
}
]
}
}
],
"type": {
"type": "reference",
"name": "Element"
"typeArguments": [
{
"type": "intrinsic",
"name": "any"
},
{
"type": "intrinsic",
"name": "any"
}
],
"name": "ReactElement"
}
}
],
Expand All @@ -8247,7 +8272,7 @@
"sources": [
{
"fileName": "src/types.ts",
"line": 424,
"line": 426,
"character": 31
}
],
Expand Down

0 comments on commit 1c6a44c

Please sign in to comment.