Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Alert] Move from lab to core #22651

Merged
merged 18 commits into from
Sep 23, 2020
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/pages/api-docs/alert-title.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
filename: /packages/material-ui-lab/src/AlertTitle/AlertTitle.js
filename: /packages/material-ui/src/AlertTitle/AlertTitle.js
---

<!--- This documentation is automatically generated, do not try to edit it. -->
Expand All @@ -11,9 +11,9 @@ filename: /packages/material-ui-lab/src/AlertTitle/AlertTitle.js
## Import

```js
import AlertTitle from '@material-ui/lab/AlertTitle';
import AlertTitle from '@material-ui/core/AlertTitle';
// or
import { AlertTitle } from '@material-ui/lab';
import { AlertTitle } from '@material-ui/core';
```

You can learn more about the difference by [reading this guide](/guides/minimizing-bundle-size/).
Expand Down Expand Up @@ -47,7 +47,7 @@ You can override the style of the component thanks to one of these customization
- With a [global class name](/customization/components/#overriding-styles-with-global-class-names).
- With a theme and an [`overrides` property](/customization/globals/#css).

If that's not sufficient, you can check the [implementation of the component](https://github.com/mui-org/material-ui/blob/next/packages/material-ui-lab/src/AlertTitle/AlertTitle.js) for more detail.
If that's not sufficient, you can check the [implementation of the component](https://github.com/mui-org/material-ui/blob/next/packages/material-ui/src/AlertTitle/AlertTitle.js) for more detail.

## Demos

Expand Down
8 changes: 4 additions & 4 deletions docs/pages/api-docs/alert.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
filename: /packages/material-ui-lab/src/Alert/Alert.js
filename: /packages/material-ui/src/Alert/Alert.js
---

<!--- This documentation is automatically generated, do not try to edit it. -->
Expand All @@ -11,9 +11,9 @@ filename: /packages/material-ui-lab/src/Alert/Alert.js
## Import

```js
import Alert from '@material-ui/lab/Alert';
import Alert from '@material-ui/core/Alert';
// or
import { Alert } from '@material-ui/lab';
import { Alert } from '@material-ui/core';
```

You can learn more about the difference by [reading this guide](/guides/minimizing-bundle-size/).
Expand Down Expand Up @@ -74,7 +74,7 @@ You can override the style of the component thanks to one of these customization
- With a [global class name](/customization/components/#overriding-styles-with-global-class-names).
- With a theme and an [`overrides` property](/customization/globals/#css).

If that's not sufficient, you can check the [implementation of the component](https://github.com/mui-org/material-ui/blob/next/packages/material-ui-lab/src/Alert/Alert.js) for more detail.
If that's not sufficient, you can check the [implementation of the component](https://github.com/mui-org/material-ui/blob/next/packages/material-ui/src/Alert/Alert.js) for more detail.

## Inheritance

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const pages = [
pathname: '/components',
subheader: '/components/feedback',
children: [
{ pathname: '/components/alert' },
{ pathname: '/components/backdrop' },
{ pathname: '/components/dialogs' },
{ pathname: '/components/progress' },
Expand Down Expand Up @@ -116,7 +117,6 @@ const pages = [
subheader: '/components/lab',
children: [
{ pathname: '/components/about-the-lab' },
{ pathname: '/components/alert' },
{ pathname: '/components/autocomplete' },
{ pathname: '/components/pagination' },
{ pathname: '/components/rating' },
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/alert/ActionAlerts.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Alert from '@material-ui/lab/Alert';
import Alert from '@material-ui/core/Alert';
import Button from '@material-ui/core/Button';

const useStyles = makeStyles((theme) => ({
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/alert/ActionAlerts.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { makeStyles, Theme, createStyles } from '@material-ui/core/styles';
import Alert from '@material-ui/lab/Alert';
import Alert from '@material-ui/core/Alert';
import Button from '@material-ui/core/Button';

const useStyles = makeStyles((theme: Theme) =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Alert from '@material-ui/lab/Alert';
import Alert from '@material-ui/core/Alert';

const useStyles = makeStyles((theme) => ({
root: {
Expand All @@ -11,7 +11,7 @@ const useStyles = makeStyles((theme) => ({
},
}));

export default function SimpleAlerts() {
export default function BasicAlerts() {
const classes = useStyles();

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { makeStyles, Theme, createStyles } from '@material-ui/core/styles';
import Alert from '@material-ui/lab/Alert';
import Alert from '@material-ui/core/Alert';

const useStyles = makeStyles((theme: Theme) =>
createStyles({
Expand All @@ -13,7 +13,7 @@ const useStyles = makeStyles((theme: Theme) =>
}),
);

export default function SimpleAlerts() {
export default function BasicAlerts() {
const classes = useStyles();

return (
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/alert/ColorAlerts.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import Alert from '@material-ui/lab/Alert';
import Alert from '@material-ui/core/Alert';

export default function ColorAlerts() {
return (
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/alert/ColorAlerts.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import Alert from '@material-ui/lab/Alert';
import Alert from '@material-ui/core/Alert';

export default function ColorAlerts() {
return (
Expand Down
3 changes: 2 additions & 1 deletion docs/src/pages/components/alert/DescriptionAlerts.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import { Alert, AlertTitle } from '@material-ui/lab';
import Alert from '@material-ui/core/Alert';
import AlertTitle from '@material-ui/core/AlertTitle';

const useStyles = makeStyles((theme) => ({
root: {
Expand Down
3 changes: 2 additions & 1 deletion docs/src/pages/components/alert/DescriptionAlerts.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { makeStyles, Theme, createStyles } from '@material-ui/core/styles';
import { Alert, AlertTitle } from '@material-ui/lab';
import Alert from '@material-ui/core/Alert';
import AlertTitle from '@material-ui/core/AlertTitle';

const useStyles = makeStyles((theme: Theme) =>
createStyles({
Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/components/alert/FilledAlerts.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Alert from '@material-ui/lab/Alert';
import Alert from '@material-ui/core/Alert';

const useStyles = makeStyles((theme) => ({
root: {
Expand All @@ -11,7 +11,7 @@ const useStyles = makeStyles((theme) => ({
},
}));

export default function SimpleAlerts() {
export default function BasicAlerts() {
const classes = useStyles();

return (
Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/components/alert/FilledAlerts.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { makeStyles, Theme, createStyles } from '@material-ui/core/styles';
import Alert from '@material-ui/lab/Alert';
import Alert from '@material-ui/core/Alert';

const useStyles = makeStyles((theme: Theme) =>
createStyles({
Expand All @@ -13,7 +13,7 @@ const useStyles = makeStyles((theme: Theme) =>
}),
);

export default function SimpleAlerts() {
export default function BasicAlerts() {
const classes = useStyles();

return (
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/alert/IconAlerts.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Alert from '@material-ui/lab/Alert';
import Alert from '@material-ui/core/Alert';
import CheckIcon from '@material-ui/icons/Check';
import CheckCircleOutlineIcon from '@material-ui/icons/CheckCircleOutline';

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/alert/IconAlerts.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { makeStyles, Theme, createStyles } from '@material-ui/core/styles';
import Alert from '@material-ui/lab/Alert';
import Alert from '@material-ui/core/Alert';
import CheckIcon from '@material-ui/icons/Check';
import CheckCircleOutlineIcon from '@material-ui/icons/CheckCircleOutline';

Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/components/alert/OutlinedAlerts.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Alert from '@material-ui/lab/Alert';
import Alert from '@material-ui/core/Alert';

const useStyles = makeStyles((theme) => ({
root: {
Expand All @@ -11,7 +11,7 @@ const useStyles = makeStyles((theme) => ({
},
}));

export default function SimpleAlerts() {
export default function BasicAlerts() {
const classes = useStyles();

return (
Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/components/alert/OutlinedAlerts.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { makeStyles, Theme, createStyles } from '@material-ui/core/styles';
import Alert from '@material-ui/lab/Alert';
import Alert from '@material-ui/core/Alert';

const useStyles = makeStyles((theme: Theme) =>
createStyles({
Expand All @@ -13,7 +13,7 @@ const useStyles = makeStyles((theme: Theme) =>
}),
);

export default function SimpleAlerts() {
export default function BasicAlerts() {
const classes = useStyles();

return (
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/alert/TransitionAlerts.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Alert from '@material-ui/lab/Alert';
import Alert from '@material-ui/core/Alert';
import IconButton from '@material-ui/core/IconButton';
import Collapse from '@material-ui/core/Collapse';
import Button from '@material-ui/core/Button';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/alert/TransitionAlerts.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { makeStyles, Theme, createStyles } from '@material-ui/core/styles';
import Alert from '@material-ui/lab/Alert';
import Alert from '@material-ui/core/Alert';
import IconButton from '@material-ui/core/IconButton';
import Collapse from '@material-ui/core/Collapse';
import Button from '@material-ui/core/Button';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/alert/alert-de.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ waiAria: 'https://www.w3.org/TR/wai-aria-practices/#alert'

Der Hinweis bietet vier Schweregrade an, welche je ein eigenes Icon und eine eigene Farbe besitzen.

{{"demo": "pages/components/alert/SimpleAlerts.js"}}
{{"demo": "pages/components/alert/BasicAlerts.js"}}

## Beschreibung

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/alert/alert-es.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ waiAria: 'https://www.w3.org/TR/wai-aria-practices/#alert'

La alerta ofrece cuatro niveles de severidad que distintivamente establecen un icono y un color.

{{"demo": "pages/components/alert/SimpleAlerts.js"}}
{{"demo": "pages/components/alert/BasicAlerts.js"}}

## Descripción

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/alert/alert-fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ waiAria: 'https://www.w3.org/TR/wai-aria-practices/#alert'

L'alerte offre quatre niveaux de sévérité qui définissent une icône et une couleur distinctes.

{{"demo": "pages/components/alert/SimpleAlerts.js"}}
{{"demo": "pages/components/alert/BasicAlerts.js"}}

## Description

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/alert/alert-ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ waiAria: 'https://www.w3.org/TR/wai-aria-practices/#alert'

このアラートは、特徴的なアイコンと色を設定する4つの重要度レベルを提供します。

{{"demo": "pages/components/alert/SimpleAlerts.js"}}
{{"demo": "pages/components/alert/BasicAlerts.js"}}

## Description

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/alert/alert-pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ waiAria: 'https://www.w3.org/TR/wai-aria-practices/#alert'

O alerta oferece quatro níveis de severidade que se distinguem em diferentes ícones e cores.

{{"demo": "pages/components/alert/SimpleAlerts.js"}}
{{"demo": "pages/components/alert/BasicAlerts.js"}}

## Descrição

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/alert/alert-ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ waiAria: 'https://www.w3.org/TR/wai-aria-practices/#alert'

Alert предлагает 4 уровня предупреждения с уникальным цветом и значком.

{{"demo": "pages/components/alert/SimpleAlerts.js"}}
{{"demo": "pages/components/alert/BasicAlerts.js"}}

## Описание

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/alert/alert-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ waiAria: 'https://www.w3.org/TR/wai-aria-practices/#alert'

警告提示有四种不同程度的级别,每种都有自己独特的颜色和图标。

{{"demo": "pages/components/alert/SimpleAlerts.js"}}
{{"demo": "pages/components/alert/BasicAlerts.js"}}

## 描述

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/alert/alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ waiAria: https://www.w3.org/TR/wai-aria-practices/#alert

The alert offers four severity levels that set a distinctive icon and color.

{{"demo": "pages/components/alert/SimpleAlerts.js"}}
{{"demo": "pages/components/alert/BasicAlerts.js"}}

## Description

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/snackbars/CustomizedSnackbars.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import Button from '@material-ui/core/Button';
import Snackbar from '@material-ui/core/Snackbar';
import MuiAlert from '@material-ui/lab/Alert';
import MuiAlert from '@material-ui/core/Alert';
import { makeStyles } from '@material-ui/core/styles';

const Alert = React.forwardRef(function Alert(props, ref) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import Button from '@material-ui/core/Button';
import Snackbar from '@material-ui/core/Snackbar';
import MuiAlert, { AlertProps } from '@material-ui/lab/Alert';
import MuiAlert, { AlertProps } from '@material-ui/core/Alert';
import { makeStyles, Theme } from '@material-ui/core/styles';

const Alert = React.forwardRef(function Alert(props: AlertProps, ref) {
Expand Down
Loading