You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/react-core/src/components/Alert/examples/Alert.md
+16-12Lines changed: 16 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,19 +15,23 @@ import ServerIcon from '@patternfly/react-icons/dist/esm/icons/server-icon';
15
15
import LaptopIcon from '@patternfly/react-icons/dist/esm/icons/laptop-icon';
16
16
import buttonStyles from '@patternfly/react-styles/css/components/Button/button';
17
17
18
+
Micro animations have been added for `<Alert>` components within an `<AlertGroup>`. By default, you must opt into animations, since they can require updates to tests. To enable or disable animations as needed, use the `hasAnimations` property. With animations enabled, we recommend you ensure that dynamically-added alerts are prepended to a list of alerts, rather than appended to the end of it.
19
+
20
+
Micro animations are turned on for all examples and demos where alerts are dynamically added.
21
+
18
22
## Alert examples
19
23
20
24
### Alert variants
21
25
22
26
PatternFly supports several alert variants for different scenarios. Each variant has an associated status icon, background, and alert title coded to communicate the severity of an alert. Use the `variant` property to apply the following styling options. If no `variant` is specified, then the variant will be set to "custom".
23
27
24
-
| Variant | Description |
25
-
|---|---|
26
-
| Custom | Use for generic messages that should have a custom color set by the associated CSS variable. Should be used when the message has no associated severity. |
27
-
| Info | Use for general informational messages |
28
-
| Success | Use to indicate that a task or process has been completed successfully |
29
-
| Warning | Use to indicate that a non-critical error has occurred|
30
-
| Danger | Use to indicate that a critical or blocking error has occurred |
| Custom | Use for generic messages that should have a custom color set by the associated CSS variable. Should be used when the message has no associated severity. |
31
+
| Info | Use for general informational messages|
32
+
| Success | Use to indicate that a task or process has been completed successfully |
33
+
| Warning | Use to indicate that a non-critical error has occurred|
34
+
| Danger | Use to indicate that a critical or blocking error has occurred|
| Static inline | Static inline alert groups contain alerts that appear when the page loads, and are seen within the normal page content flow. These groups should not contain alerts that will dynamically appear or update. |
411
-
| Toast | Toast alert groups contain alerts that typically appear in response to an asynchronous event or user action. These groups are positioned on top of other content at the top right of the page.|
412
-
| Dynamic | Dynamic alert groups contain alerts that typically appear in response to a user action, and are seen within the normal page content flow.|
415
+
| Toast | Toast alert groups contain alerts that typically appear in response to an asynchronous event or user action. These groups are positioned on top of other content at the top right of the page.|
416
+
| Dynamic | Dynamic alert groups contain alerts that typically appear in response to a user action, and are seen within the normal page content flow. |
413
417
414
418
Dynamic alerts that are generated after the page initially loads must be appended to either a toast or dynamic `AlertGroup`, both of which must use the `isLiveRegion` property. New alerts appended to a toast or dynamic group will be announced by assistive technologies the moment the change happens. For information about customizing this announcement, read the [aria-atomic and aria-relevant](/components/alert/accessibility#aria-atomic-and-aria-relevant) section of the alert accessibility documentation.
0 commit comments