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] Migrate to emotion #24442

Merged
merged 15 commits into from
Jan 18, 2021
3 changes: 2 additions & 1 deletion docs/pages/api-docs/alert.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
},
"default": "'success'"
},
"sx": { "type": { "name": "object" } },
"variant": {
"type": {
"name": "union",
Expand Down Expand Up @@ -65,5 +66,5 @@
"filename": "/packages/material-ui/src/Alert/Alert.js",
"inheritance": { "component": "Paper", "pathname": "/api/paper/" },
"demos": "<ul><li><a href=\"/components/alert/\">Alert</a></li></ul>",
"styledComponent": false
"styledComponent": true
}
1 change: 1 addition & 0 deletions docs/translations/api-docs/alert/alert.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"onClose": "Callback fired when the component requests to be closed. When provided and no <code>action</code> prop is set, a close icon button is displayed that triggers the callback when clicked.<br><br><strong>Signature:</strong><br><code>function(event: object) =&gt; void</code><br><em>event:</em> The event source of the callback.",
"role": "The ARIA role attribute of the element.",
"severity": "The severity of the alert. This defines the color and icon used.",
"sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the <a href=\"/system/basics/#the-sx-prop\">`sx` page</a> for more details.",
"variant": "The variant to use."
},
"classDescriptions": {
Expand Down
7 changes: 6 additions & 1 deletion packages/material-ui/src/Alert/Alert.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { OverridableStringUnion } from '@material-ui/types';
import { InternalStandardProps as StandardProps } from '..';
import { SxProps } from '@material-ui/system';
import { InternalStandardProps as StandardProps, Theme } from '..';
import { PaperProps } from '../Paper';

export type Color = 'success' | 'info' | 'warning' | 'error';
Expand Down Expand Up @@ -101,6 +102,10 @@ export interface AlertProps extends StandardProps<PaperProps, 'variant'> {
* @default 'standard'
*/
variant?: OverridableStringUnion<AlertVariantDefaults, AlertPropsVariantOverrides>;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
}

export type AlertClassKey = keyof NonNullable<AlertProps['classes']>;
Expand Down
Loading