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: README.md
+14-5Lines changed: 14 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,25 @@
2
2
3
3
Web components used by the WPCampus organization.
4
4
5
-
## Customize web components
5
+
## Our web components
6
6
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.
9
11
10
12
-**notificationsURL**: the URL used to request the notification information
11
13
-**localStorageSeconds**: how long the notification is cached in local storage (in seconds)
12
14
-**requestUpdateSeconds**: how often to check for a notification update (in seconds)
13
15
-**requestUpdateMax**: how many requests to make for notification updates before going to sleep
14
16
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:
16
22
17
23
```
18
-
// Create the element with JavaScript.
19
24
var notifications = document.createElement("wpcampus-notifications");
20
25
21
26
// 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.
36
41
37
42
`yarn add /Users/{absolute path to folder}/wpcampus-web-components --check-files`
38
43
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
+
39
48
## Disclaimer
40
49
41
50
This repo is shared for educational purposes. Feel free to explore, copy, submit fixes, and share the code.
0 commit comments