Sha256: 7569c7af7027aa9240e4ea741e2443268bb32a5ca1e1a365eaac1651422cd726

Contents?: true

Size: 1.82 KB

Versions: 9

Compression:

Stored size: 1.82 KB

Contents

<div id="<%= id %>" x-data="embed" class="not-prose embed border border-gray-300 rounded-md overflow-hidden" @page:morphed.window="recaclulateIframeHeight" @tab-switch.window="recaclulateIframeHeight">
  <header class="px-3 py-2 flex items-center text-xs text-gray-400 bg-white border-b border-gray-300">
    <div class="text-gray-500">
      <%= example.preview.label %> (<%= example.label %>)
    </div>
    <div class="ml-auto flex items-center space-x-3">
      <a href="<%= lookbook_inspect_path(example.path, params) %>" class="" x-tooltip.theme.lookbook="`View in Inspector`">
        <%= icon "eye", size: 4, class: "hover:text-indigo-800" %>
      </a>
      <a
        href="<%= lookbook_preview_path(example.path, params) %>"
        target="_blank"
        class="-top-px relative"
        x-tooltip.theme.lookbook="`Open in new window`">
        <%= icon "external-link", size: 4, class: "hover:text-indigo-800" %>
      </a>
    </div>
  </header>
  <div class="checked-bg overflow-hidden">
    <div x-ref="resizer" class="grid bg-white relative grid-cols-[1fr_17px] w-full" :style="`max-width: ${maxWidth}; height: ${height ? `${height}px` : 'auto'}`">
      <iframe seamless
        id="<%= id %>-iframe"
        x-ref="iframe"
        src="<%= lookbook_preview_path(example.path, params.merge(lookbook_embed: true)) %>"
        class="min-w-full h-full w-px"
        :class="{ 'pointer-events-none': reflowing }"
        @load="recaclulateIframeHeight">
      </iframe>
      <div
        class="resize-handle border-r border-l cursor-[col-resize] relative -right-px"
        @pointerdown="onResizeWidthStart"
        @dblclick="toggleFullWidth">
        <svg class="h-4 w-4 pointer-events-none" fill="currentColor" viewBox="0 0 24 24">
          <path d="M8 5h2v14H8zM14 5h2v14h-2z"></path>
        </svg>
      </div>
    </div>
  </div>    
</div>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
lookbook-0.9.8 app/views/lookbook/components/_embed.html.erb
lookbook-0.9.7 app/views/lookbook/components/_embed.html.erb
lookbook-0.9.6 app/views/lookbook/components/_embed.html.erb
lookbook-0.9.5 app/views/lookbook/components/_embed.html.erb
lookbook-0.9.4 app/views/lookbook/components/_embed.html.erb
lookbook-0.9.3 app/views/lookbook/components/_embed.html.erb
lookbook-0.9.2 app/views/lookbook/components/_embed.html.erb
lookbook-0.9.1 app/views/lookbook/components/_embed.html.erb
lookbook-0.9.0 app/views/lookbook/components/_embed.html.erb