diff --git a/packages/material-ui-lab/src/Alert/Alert.d.ts b/packages/material-ui-lab/src/Alert/Alert.d.ts
index e761cb5c2ac815..7dca614cfefb44 100644
--- a/packages/material-ui-lab/src/Alert/Alert.d.ts
+++ b/packages/material-ui-lab/src/Alert/Alert.d.ts
@@ -1,2 +1,3 @@
import Alert from '@material-ui/core/Alert';
+
export default Alert;
diff --git a/packages/material-ui-lab/src/Alert/Alert.js b/packages/material-ui-lab/src/Alert/Alert.js
index f71dce6dbacf0b..e15e2229123781 100644
--- a/packages/material-ui-lab/src/Alert/Alert.js
+++ b/packages/material-ui-lab/src/Alert/Alert.js
@@ -1,23 +1,21 @@
import React from 'react';
-import warning from 'warning';
import Alert from '@material-ui/core/Alert';
-let warnedOnce = false;
-
export default React.forwardRef(function DeprecatedAlert(props, ref) {
+ let warnedOnce = false;
- warning(
- warnOnce,
+ if (!warnedOnce) {
+ console.warn(
+ [
+ 'Material-UI: the Alert component was moved from the lab to the core.',
+ '',
+ "You should use `import { Alert } from '@material-ui/core'`",
+ "or `import Alert from '@material-ui/core/Alert'`",
+ ].join('\n'),
+ );
- [
- 'Material-UI: the Alert component was moved from the lab to the core.',
- '',
- "You should use `import { Alert } from '@material-ui/core'`",
- "or `import Alert from '@material-ui/core/Alert'`",
- ].join('\n'),
- );
-
- warnOnce = true;
+ warnedOnce = true;
+ }
return ;
});
diff --git a/packages/material-ui-lab/src/AlertTitle/AlertTitle.d.ts b/packages/material-ui-lab/src/AlertTitle/AlertTitle.d.ts
index e636fcee3cdfd2..b19569472d820e 100644
--- a/packages/material-ui-lab/src/AlertTitle/AlertTitle.d.ts
+++ b/packages/material-ui-lab/src/AlertTitle/AlertTitle.d.ts
@@ -1,2 +1,3 @@
import AlertTitle from '@material-ui/core/AlertTitle';
+
export default AlertTitle;
diff --git a/packages/material-ui-lab/src/AlertTitle/AlertTitle.js b/packages/material-ui-lab/src/AlertTitle/AlertTitle.js
index 77c08fd55ddbb0..f39ae66b7aae44 100644
--- a/packages/material-ui-lab/src/AlertTitle/AlertTitle.js
+++ b/packages/material-ui-lab/src/AlertTitle/AlertTitle.js
@@ -1,21 +1,21 @@
import React from 'react';
-import warning from 'warning';
import AlertTitle from '@material-ui/core/AlertTitle';
export default React.forwardRef(function DeprecatedAlertTitle(props, ref) {
- let warnOnce = false;
+ let warnedOnce = false;
- warning(
- warnOnce,
- [
- 'Material-UI: the AlertTitle component was moved from the lab to the core.',
- '',
- "You should use `import { AlertTitle } from '@material-ui/core'`",
- "or `import AlertTitle from '@material-ui/core/AlertTitle'`",
- ].join('\n'),
- );
-
- warnOnce = true;
+ if (!warnedOnce) {
+ console.warn(
+ [
+ 'Material-UI: the AlertTitle component was moved from the lab to the core.',
+ '',
+ "You should use `import { AlertTitle } from '@material-ui/core'`",
+ "or `import AlertTitle from '@material-ui/core/AlertTitle'`",
+ ].join('\n'),
+ );
+
+ warnedOnce = true;
+ }
return ;
});