ember-modal-dialog icon indicating copy to clipboard operation
ember-modal-dialog copied to clipboard

Integrate Bootstrap modal?

Open mrkongo opened this issue 8 years ago • 1 comments

How to use the Bootstrap modals with this amazing addon? Anyone before me with this problem?

mrkongo avatar Jul 10 '17 18:07 mrkongo

@mrkongo as a first attempt I've had some success including the bootstrap modal html, but without the parent div.modal in the template like so:

{{#modal-dialog targetAttachment='center' translucentOverlay=true}}
  <div class='modal-dialog' role='document'>
    <div class='modal-content'>
      <div class='modal-header'>
        <h5 class='modal-title'>Modal title</h5>
        <button {{action 'toggleModal'}} type='button' class='close' data-dismiss='modal' aria-label='Close'>
          <span aria-hidden='true'>&times;</span>
        </button>
      </div>
      <div class='modal-body'>
        <p>Modal body text goes here.</p>
      </div>
      <div class='modal-footer'>
        <button type='button' class='btn btn-primary'>Save</button>
      </div>
    </div>
  </div>
{{/modal-dialog}}

A minor css change is also necessary. I've added a modals.scss file with the following:

@import "ember-modal-dialog/ember-modal-structure";

.ember-modal-overlay.translucent {
  background-color: rgba(#808080, .77);
}

I'm pretty sure there might be more css changes needed, but for the moment this seems good enough.

screen shot 2017-07-11 at 12 07 34

stfcodes avatar Jul 11 '17 09:07 stfcodes