Skip to content

Commit 56a8809

Browse files
committed
formatting
1 parent 05cb586 commit 56a8809

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

public/classes/ListTemplate.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export class ListTemplate {
2+
// html unordered list element
23
constructor(container) {
34
this.container = container;
45
}

src/classes/ListTemplate.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { HasFormatter } from "../interfaces/HasFormatter";
22

33
export class ListTemplate {
4-
constructor(private container: HTMLUListElement){}
4+
// html unordered list element
5+
constructor(private container: HTMLUListElement) { }
56

6-
render(item: HasFormatter, heading: string, pos: 'start' | 'end'){
7+
render(item: HasFormatter, heading: string, pos: 'start' | 'end') {
78
const li = document.createElement('li');
8-
9+
910
const h4 = document.createElement('h4');
1011
h4.innerText = heading;
1112
li.append(h4);
@@ -14,7 +15,7 @@ export class ListTemplate {
1415
p.innerText = item.format();
1516
li.append(p);
1617

17-
if(pos === 'start'){
18+
if (pos === 'start') {
1819
this.container.prepend(li);
1920
} else {
2021
this.container.append(li);

0 commit comments

Comments
 (0)