Skip to content

Commit

Permalink
[Alert] Migrate to emotion (#24442)
Browse files Browse the repository at this point in the history
  • Loading branch information
kutnickclose authored Jan 18, 2021
1 parent b2ee952 commit 95b8edc
Show file tree
Hide file tree
Showing 9 changed files with 214 additions and 164 deletions.
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

0 comments on commit 95b8edc

Please sign in to comment.