Skip to content

Commit 8802244

Browse files
authored
Merge pull request #13 from materializecss/v2-dev
Fix Download Css button
2 parents e6b4932 + 94f7598 commit 8802244

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

partials/navbar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ <h4>Color Scheme</h4>
7474
<label>Primary Color</label>
7575
<input type="color" id="color-picker" value="#0000ff" />
7676
</div>
77-
<button type="button" class="btn" onclick="downloadCss()">Download css style</button>
77+
<button id="downloadCss" type="button" class="btn">Download css style</button>
7878
</div>
7979
<div class="modal-footer">
8080
<a href="#!" class="modal-close waves-effect btn-flat">Close</a>

src/main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ document.addEventListener("DOMContentLoaded", async function () {
207207
toggleColorsButton?.addEventListener("change", () => {
208208
themes.setThemePrimaryColor(toggleColorsButton.value);
209209
});
210+
const downloadCssButton = document.querySelector("#downloadCss");
211+
downloadCssButton.addEventListener("click", (e) => {
212+
themes.downloadCss();
213+
});
210214

211215
//---------------------------------------------------------------
212216

0 commit comments

Comments
 (0)