Skip to content

Commit 6816d75

Browse files
committed
add: added the class constructor for the difficulty dropdown component
1 parent ac72ce5 commit 6816d75

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

options/difficulyDropdown.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class DifficultyDropdown {
2+
constructor(container, difficulties, onChange) {
3+
this.container = container;
4+
this.difficulties = difficulties;
5+
this.onChange = onChange;
6+
this.selectedDifficulty = 'all';
7+
this.filteredDifficulties = ['all', ...difficulties];
8+
}
9+
}

options/options.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ <h2>All Solved Problems</h2>
3535
<option value="recent-desc">Most recently solved</option>
3636
<option value="recent-asc">Least recently solved</option>
3737
</select>
38+
<div id="difficultyDropdownContainer"></div>
3839
</div>
3940
<div id="problemsList"></div>
4041
</section>

0 commit comments

Comments
 (0)