Skip to content

Commit fabb939

Browse files
committed
update
2 parents 1b682fc + 6a798d8 commit fabb939

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/widgets/modals.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ export type ListItem = {
99
link: string
1010
}
1111

12-
// Two functions that need to be implemented to use the modal
13-
// When the user clicks the button, open the modal
12+
// Two functions that need to be implemented to use the modal.
13+
// When the user clicks the button, open the modal.
1414
/* Click handler on the button to display it.
1515
btn.onclick = function() {
1616
modal.style.display = "block";
1717
}
1818
19-
// When the user clicks anywhere outside of the modal, close it
20-
Window click handler so that the modal will close
21-
even if the user doesn't click close
19+
// When the user clicks anywhere outside of the modal, close it.
20+
// Window click handler so that the modal will close
21+
// even if the user doesn't click close.
2222
window.onclick = function(event) {
2323
if (event.target == modal) {
2424
modal.style.display = "none";
@@ -68,7 +68,7 @@ const createListItems = (dom: HTMLDocument, list: ListItem) => {
6868
const link: HTMLAnchorElement = dom.createElement('a')
6969
link.setAttribute('style', style.modalAnchorStyle)
7070
link.href = list.link
71-
link.innerHTML = list.label
71+
link.textContent = list.label
7272
li.appendChild(link)
7373
return li
7474
}

src/widgets/modalsStyle.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Get the button style, based on options.
3-
* See https://design.inrupt.com/atomic-core/?cat=Atoms#Buttons
2+
* Get the modal styles, based on options such as position and background overlay.
3+
* See https://design.inrupt.com/atomic-core/?cat=Organisms#Modals for modal design guidelines.
44
*/
55
export type ModalWidgetStyleOptions = {
66
topPosition?: string,

0 commit comments

Comments
 (0)