Skip to content

Commit 2e58cd8

Browse files
committed
Optimizing the readme file for notification component
1 parent 1e94e89 commit 2e58cd8

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,25 @@
22

33
Web components used by the WPCampus organization.
44

5-
## Customize web components
5+
## Our web components
66

7-
### Notifications
8-
Our notifications web component is extendable with the following properties, which you can modify by creating the element with JavaScript.
7+
### Notifications Bar
8+
Our notifications web component is defined as `<wpcampus-notifications>`.
9+
10+
The HTML element is extendable with the following properties, which you can modify by creating the element with JavaScript.
911

1012
- **notificationsURL**: the URL used to request the notification information
1113
- **localStorageSeconds**: how long the notification is cached in local storage (in seconds)
1214
- **requestUpdateSeconds**: how often to check for a notification update (in seconds)
1315
- **requestUpdateMax**: how many requests to make for notification updates before going to sleep
1416

15-
### Example
17+
#### How to use the element
18+
19+
Place the element in your HTML markup: `<wpcampus-notifications></wpcampus-notifications>`
20+
21+
Or create the element with JavaScript:
1622

1723
```
18-
// Create the element with JavaScript.
1924
var notifications = document.createElement("wpcampus-notifications");
2025
2126
// You can change the following notification properties. The following are defaults.
@@ -36,6 +41,10 @@ You'll want to use `npm install` or `yarn add` depending on the project.
3641

3742
`yarn add /Users/{absolute path to folder}/wpcampus-web-components --check-files`
3843

44+
## What are web components?
45+
46+
Web components are a set of web platform APIs that allow you to create new custom, reusable, encapsulated HTML tags to use in web pages and web apps. Learn more at [webcomponents.org](https://www.webcomponents.org/introduction).
47+
3948
## Disclaimer
4049

4150
This repo is shared for educational purposes. Feel free to explore, copy, submit fixes, and share the code.

0 commit comments

Comments
 (0)