Skip to content

Commit df2d8a3

Browse files
Update bannerImpl.md
1 parent cb8f281 commit df2d8a3

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

docs/developers/bannerImpl.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
## Warning Banners Implementation
22
The implementation of the warning banners are implemented in few steps, which first are implemented in the `pushNotificationMessage` function.
3-
The function then pushes a new message into the stack and renders it with a notification initalized boolean.
4-
3+
The function then pushes a new message into the stack and renders it with a notification initalized boolean:
54
``` ts
65
export function pushNotificationMessage(options: NotificationOptions): void {
76
if (!notificationsInitialized) {
@@ -16,13 +15,13 @@ export function pushNotificationMessage(options: NotificationOptions): void {
1615
```
1716
[pushNotificationMessage Implementation](https://github.com/microsoft/pxt/blob/master/react-common/components/Notification.tsx#L73-L82)
1817

19-
It then processes into the warning notification function, which gets passed by pushNotificationMessage.
18+
It then processes into the warning notification function, which gets passed by pushNotificationMessage:
2019
``` ts
2120
function showNotificationMsg(kind: string, msg: string) {
2221
pushNotificationMessage({ kind: kind, text: msg, hc: false }); // No high contrast support in skillmap
2322
}
2423
```
25-
And then all these steps get executed by `showNotificationMsg`. Finally, these functions then are called in `errorNotification` and `warningNotification.`
24+
And then all these steps get executed by `showNotificationMsg`. Finally, these functions then are called in `errorNotification` and `warningNotification`:
2625

2726
``` ts
2827
export function errorNotification(msg: string) {

0 commit comments

Comments
 (0)