Sha256: 1ef989045c65b637029badb0bb04625109d57a03de00ae2aba607525a6387740
Contents?: true
Size: 1.93 KB
Versions: 1
Compression:
Stored size: 1.93 KB
Contents
<% if @example.present? %> <%= render_component_tag class: "not-prose border-b border-lookbook-divider rounded-sm overflow-hidden", "@navigation:start.window": "cleanup" do %> <%= render_component :toolbar, class: "border border-b-0 border-lookbook-divider" do |toolbar| %> <% toolbar.section padded: true do %> <h3> <%= @example.preview.label %> (<%= @example.label %>) </h3> <% end %> <% toolbar.section align: :right, divide: :left do %> <%= render_component :button_group do |group| %> <% group.button icon: :eye, href: helpers.lookbook_inspect_path(@example.path, @params), tooltip: "View in Inspector" %> <% group.button icon: :external_link, href: helpers.lookbook_inspect_path(@example.path, @params), tooltip: "Open in new window", target: "_blank" %> <% end %> <% end %> <% end %> <div x-show="tab === 'preview'" @viewport:loaded="loadResizer" @dom:update-complete="loadResizer" @viewport:resize-progress="resizeIframe" @viewport:resize-complete="resizeIframe"> <%= render_component :viewport, src: helpers.lookbook_preview_path(@example.path, @params.merge(lookbook_embed: true)), alpine_data: "store", resize_height: false, max_height: @max_height, class: "mb-[-2px]" %> </div> <% end %> <% else %> <%= render_component_tag class: "bg-white flex flex-col items-center justify-center border-2 border-dashed border-gray-200 p-6 rounded-md not-prose" do %> <div class="px-4 text-center"> <%= render_component :icon, name: :alert_triangle, size: 6, class: "text-red-300 mx-auto" %> <div class="mt-2 max-w-xs"> <h5 class="text-base">Preview not found</h5> <p class="mt-1 opacity-50 text-sm"> The preview may have been renamed or deleted </p> </div> </div> <% end %> <% end %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lookbook-1.0.0.beta.2 | app/components/lookbook/embed/component.html.erb |