JSFiddle - React, Tailwind, and code Playground

by ericf

HTML

<script src="http://yui.yahooapis.com/3.5.0pr4/build/yui/yui-min.js"></script>
<div id="test" class="yui3-skin-sam">

<h1>Panel Test</h1>

<p>
    This is an example using the YUI 3.5.0 <code><a href="https://github.com/yui/yui3/tree/master/src/panel">Panel</a></code> component.
</p>

<p><button id="show-panel">Show Panel</button></p>

</div>

JavaScript

YUI().use('panel', function (Y) {

    var panel = new Y.Panel({
        headerContent: 'A Panel',
        bodyContent  : 'Super easy to use!',
        
        buttons: {
            header: ['close'],
            footer: [
                {
                    label    : 'Okay',
                    action   : 'hide',
                    isDefault: true
                }
            ]
        },
        
        modal   : true,
        centered: true,
        visible : false,
        render  : '#test',
    });
    
    Y.one('#show-panel').on('click', panel.show, panel);

});