Skip to content

Commit

Permalink
Merge pull request #21 from nemuvski/add-sample-preview
Browse files Browse the repository at this point in the history
Added `indeterminate` samples to preview page
  • Loading branch information
nemuvski authored Jan 27, 2024
2 parents c41b25b + 41ac656 commit 2f9151b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docs/assets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ window.addEventListener("load", () => {
document.getElementById("js-dialog-close").addEventListener("click", () => {
dialog.close();
});

// Set `indeterminate`
document.querySelectorAll(".js-indeterminate").forEach((el) => {
el.indeterminate = true;
});
});
30 changes: 28 additions & 2 deletions docs/preview/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,13 @@ <h6>heading 6</h6>
</div>

<div class="c-section">
<span>progress:</span>
<progress></progress>
<span>progress(indeterminate):</span>
<progress class="js-indeterminate"></progress>
</div>

<div class="c-section">
<span>progress(determinate):</span>
<progress value="70" max="100">70%</progress>
</div>

<div class="c-section">
Expand Down Expand Up @@ -507,6 +512,18 @@ <h6>heading 6</h6>
</form>
</div>

<div class="c-section">
<form>
<fieldset>
<legend>fieldset-legend (radio-indeterminate)</legend>
<label>
<input type="radio" name="input-radio-group" value="input-radio-indeterminate" class="js-indeterminate" />
input-radio-indeterminate
</label>
</fieldset>
</form>
</div>

<div class="c-section">
<form>
<fieldset>
Expand All @@ -523,6 +540,15 @@ <h6>heading 6</h6>
<input type="checkbox" name="input-checkbox-group" value="input-checkbox-disabled" disabled />
input-checkbox-disabled
</label>
<label>
<input
type="checkbox"
name="input-checkbox-group"
value="input-checkbox-indeterminate"
class="js-indeterminate"
/>
input-checkbox-indeterminate
</label>
</fieldset>
</form>
</div>
Expand Down

0 comments on commit 2f9151b

Please sign in to comment.