<% layout('./../../layout') -%>

<% include _react_menu %>

<header class="sn-layout__header sn-presentation-header">
  <div aria-expanded="false" role="button" tabindex="0" class="sn-layout__drawer-button">
    <i class="material-icons"></i>
  </div>
  <div class="sn-layout__title-group">
    <div class="sn-layout__title-wrap">
      <span class="sn-layout__title">React</span>
    </div>  
    <div class="sn-layout__title-wrap">
      <span class="sn-layout__title">Modal</span>
    </div>
  </div>
</header>

<main class="sn-layout__content sn-presentation-layout__content">
  <div class="sn-grid sn-grid--horizontal sn-grid--bleed sn-grid--bleed-all">
    <div class="sn-cell--1">
      <h3>Example</h3>
      <div id="modal-component"></div>
    </div>
  </div>

  <div class="sn-grid sn-grid--horizontal sn-grid--bleed sn-grid--bleed-bottom">
    <div class="sn-cell--1">
      <pre class="sn-presentation-pre-panel">
&lt;Modal open={true} size="large"&gt;
  &lt;ModalHeader&gt;
    &lt;span className=&quot;modal-title&quot;&gt;T&iacute;tulo do Modal&lt;/span&gt;
  &lt;/ModalHeader&gt;

  &lt;ModalBody&gt;
    &lt;p&gt;Algum conte&uacute;do pertinente ao modal daqui&lt;/p&gt;
  &lt;/ModalBody&gt;

  &lt;ModalFooter&gt;
    Rodap&eacute; desse modal
  &lt;/ModalFooter&gt;
&lt;/Modal&gt;
      </pre>
    </div>
  </div>

  <div class="sn-grid sn-grid--horizontal sn-grid--bleed sn-grid--bleed-bottom">
    <div class="sn-cell--1">
      <h4>Modal</h4>
      <table class="sn-presentation-table">
        <thead>
          <tr>
            <th>Attribute</th>
            <th>Type</th>
            <th>Default</th>
            <th>Description</th>
            <th>Required</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>open</td>
            <td>bool</td>
            <td>null</td>
            <td>Open modal?</td>
            <td>Yes</td>
          </tr>
          <tr>
            <td>children</td>
            <td>node</td>
            <td>null</td>
            <td>Modal content</td>
            <td>Yes</td>
          </tr>
          <tr>
            <td>onClose</td>
            <td>func</td>
            <td>null</td>
            <td>Call this function after the modal is closed</td>
            <td>No</td>
          </tr>
          <tr>
            <td>size</td>
            <td>string</td>
            <td>medium</td>
            <td>
              The size of modal can be small, large or medium(if the size value was null)
            </td>
            <td>No</td>
          </tr>
          <tr>
            <td>modalType</td>
            <td>string</td>
            <td>normal</td>
            <td>
              The modal type can be normal or dialog
            </td>
            <td>No</td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>

  <div class="sn-grid sn-grid--horizontal sn-grid--bleed sn-grid--bleed-bottom">
    <div class="sn-cell--1">
      <h4>Modal Header</h4>
      <table class="sn-presentation-table">
        <thead>
          <tr>
            <th>Attribute</th>
            <th>Type</th>
            <th>Default</th>
            <th>Description</th>
            <th>Required</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>children</td>
            <td>node</td>
            <td>null</td>
            <td>Modal header content</td>
            <td>Yes</td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>

  <div class="sn-grid sn-grid--horizontal sn-grid--bleed sn-grid--bleed-bottom">
    <div class="sn-cell--1">
      <h4>Modal Body</h4>
      <table class="sn-presentation-table">
        <thead>
          <tr>
            <th>Attribute</th>
            <th>Type</th>
            <th>Default</th>
            <th>Description</th>
            <th>Required</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>children</td>
            <td>node</td>
            <td>null</td>
            <td>Modal content</td>
            <td>Yes</td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>

  <div class="sn-grid sn-grid--horizontal sn-grid--bleed sn-grid--bleed-bottom">
    <div class="sn-cell--1">
      <h4>Modal Footer</h4>
      <table class="sn-presentation-table">
        <thead>
          <tr>
            <th>Attribute</th>
            <th>Type</th>
            <th>Default</th>
            <th>Description</th>
            <th>Required</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>children</td>
            <td>node</td>
            <td>null</td>
            <td>Modal footer content</td>
            <td>Yes</td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>
</main>

<% script('/modal.js', 'text/babel') -%>