Skip to content

Commit

Permalink
docs(button): fix demos
Browse files Browse the repository at this point in the history
  • Loading branch information
bennypowers committed Oct 22, 2023
1 parent a8fd559 commit cb57759
Showing 1 changed file with 24 additions and 30 deletions.
54 changes: 24 additions & 30 deletions elements/rh-button/demo/form-control.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@
<link rel="stylesheet" href="demo.css">
<script type="module" src="form-control.js"></script>

<section>
<h2>Form Control</h2>
<form id="form">
<fieldset id="fieldset">
<legend>
rh-button in a <code>&lt;fieldset&gt;</code> element;
clicking this button must submit the form
</legend>
<rh-button id="button" type="submit">Submit</rh-button>
</fieldset>

<fieldset id="checkboxes">
<legend>Use these checkboxes to toggle disabled state</legend>
<input id="fst" type="checkbox" data-controls="fieldset" type="checkbox">
<label for="fst">Disable fieldset</label>
<input id="btn" type="checkbox" data-controls="button">
<label for="btn">Disable rh-button</label>
</fieldset>

<fieldset id="outputs">
<legend>Observe and reset form state</legend>
<rh-button type="reset">Reset</rh-button>
<label for="output">Form status:</label>
<output id="output">Pending</output>
</fieldset>
</form>
</section>
<form id="form">
<fieldset id="fieldset">
<legend>
rh-button in a <code>&lt;fieldset&gt;</code> element;
clicking this button must submit the form
</legend>
<rh-button id="button" type="submit">Submit</rh-button>
</fieldset>

<fieldset id="checkboxes">
<legend>Use these checkboxes to toggle disabled state</legend>
<input id="fst" type="checkbox" data-controls="fieldset" type="checkbox">
<label for="fst">Disable fieldset</label>
<input id="btn" type="checkbox" data-controls="button">
<label for="btn">Disable rh-button</label>
</fieldset>

<fieldset id="outputs">
<legend>Observe and reset form state</legend>
<rh-button type="reset">Reset</rh-button>
<label for="output">Form status:</label>
<output id="output">Pending</output>
</fieldset>
</form>

<script type="module">
import '@rhds/elements/rh-button/rh-button.js';
Expand Down

0 comments on commit cb57759

Please sign in to comment.