Stephanevg/PSHTML

Add tag "modal"

kort3x opened this issue · 3 comments

Hi @kort3x
Modal is not a HTML tag, but a bootstrap class. Bootstrap classes are supported out of the box on PSHTML.

Currently, there is no example on how to use that bootstrap feature in PSHTML.
I)ll create a PSHTML example when I have a minute:

HTML example to convert

<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>

I know modal isn't a html tag but maybe there should be a cmdlet/snippet in PSHTML for ease of use?

Do you have an example of what you would like to have?