Created
December 1, 2016 11:31
-
-
Save brunocarvalhodearaujo/706dd8e2391f61075d49d33798bbb8bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import preact, { h, render, Component } from 'preact' | |
class Page extends Component { | |
componentDidMount() { | |
$('.btn').draggable({ iframeFix: true, iframeScroll: true }) | |
$('.render').on('load', () => { | |
$('.render').contents().find('[wf-droppable]').droppable({ | |
over: ({ target, toElement }) => $(target).css({ border: '2px solid #000000' }), | |
out: ({ target, toElement }) => $(target).css({ border: 'none' }), | |
drop: ({ target, toElement }) => console.log(target, toElement) | |
}) | |
}) | |
} | |
render({ template }) { | |
return <iframe elevation="true" className="render" src={template}/> | |
} | |
} | |
render(( | |
<div className="container-fluid"> | |
<div class="btn btn-default" style={{ 'z-index': '3000' }}> | |
exemplo | |
</div> | |
<Page template="blank.html" /> | |
</div> | |
), document.body) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment