diff --git a/src/SnackbarContent/SnackbarContent.tsx b/src/SnackbarContent/SnackbarContent.tsx index 86bb5a43..8b7638a9 100644 --- a/src/SnackbarContent/SnackbarContent.tsx +++ b/src/SnackbarContent/SnackbarContent.tsx @@ -1,6 +1,7 @@ import React, { forwardRef } from 'react'; import clsx from 'clsx'; import { createStyles, Theme, withStyles, WithStyles } from '@material-ui/core/styles'; +import { SnackbarContentProps } from '../index'; const styles = (theme: Theme) => createStyles({ root: { @@ -14,9 +15,9 @@ const styles = (theme: Theme) => createStyles({ } }); -interface SnackbarContentProps extends WithStyles, React.HTMLAttributes { } +interface Props extends WithStyles, SnackbarContentProps { } -const SnackbarContent = forwardRef(({ classes, className, ...props }, ref) => ( +const SnackbarContent = forwardRef(({ classes, className, ...props }, ref) => (
)) diff --git a/src/index.d.ts b/src/index.d.ts index 9d024091..44f58065 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -108,7 +108,7 @@ export interface TransitionHandlerProps { onExited: TransitionHandler; } -export type SnackbarContentProps = React.HTMLAttributes +export type SnackbarContentProps = React.HTMLAttributes; /** * @category Shared @@ -269,6 +269,7 @@ export interface ProviderContext { export function withSnackbar

(component: React.ComponentType

): React.ComponentClass> & { WrappedComponent: React.ComponentType

}; +export declare const SnackbarContent: React.ComponentType>; export function useSnackbar(): ProviderContext; diff --git a/typedoc.json b/typedoc.json index 60c270b8..61b16eca 100644 --- a/typedoc.json +++ b/typedoc.json @@ -5471,7 +5471,7 @@ } }, { - "id": 222, + "id": 223, "name": "WithSnackbarProps", "kind": 4194304, "kindString": "Type alias", @@ -5481,7 +5481,7 @@ "sources": [ { "fileName": "src/index.d.ts", - "line": 276, + "line": 277, "character": 29 } ], @@ -5493,6 +5493,49 @@ }, { "id": 220, + "name": "SnackbarContent", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true, + "isConst": true + }, + "sources": [ + { + "fileName": "src/index.d.ts", + "line": 272, + "character": 36 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intersection", + "types": [ + { + "type": "reference", + "id": 213, + "name": "SnackbarContentProps" + }, + { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "name": "HTMLDivElement" + } + ], + "name": "RefAttributes" + } + ] + } + ], + "name": "React.ComponentType" + } + }, + { + "id": 221, "name": "useSnackbar", "kind": 64, "kindString": "Function", @@ -5501,7 +5544,7 @@ }, "signatures": [ { - "id": 221, + "id": 222, "name": "useSnackbar", "kind": 4096, "kindString": "Call signature", @@ -5518,7 +5561,7 @@ "sources": [ { "fileName": "src/index.d.ts", - "line": 273, + "line": 274, "character": 27 } ] @@ -5763,14 +5806,21 @@ 205, 211, 181, - 222 + 223 + ] + }, + { + "title": "Variables", + "kind": 32, + "children": [ + 220 ] }, { "title": "Functions", "kind": 64, "children": [ - 220, + 221, 214 ] }