Skip to content

Instantly share code, notes, and snippets.

@hadijahkyampeire
Created March 19, 2020 22:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hadijahkyampeire/a1e061c1ea414e59ff6c61cbc4383eef to your computer and use it in GitHub Desktop.
Save hadijahkyampeire/a1e061c1ea414e59ff6c61cbc4383eef to your computer and use it in GitHub Desktop.
Our modal file which takes in the output prop and presents it as a text we can read
import React from 'react';
export const PreviewModal = ({ output }) => (
<div class="modal fade" id="previewModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">
Preview Modal
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body" dangerouslySetInnerHTML={{ __html: output }} />
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">
Done
</button>
</div>
</div>
</div>
</div>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment