app/views/lookbook/components/_embed.html.erb in lookbook-0.8.3 vs app/views/lookbook/components/_embed.html.erb in lookbook-0.9.0
- old
+ new
@@ -1,16 +1,16 @@
-<div id="<%= id %>" x-data="embed" class="not-prose embed border border-gray-300 rounded-md overflow-hidden" @page:morphed.window="recaclulateIframeHeight">
+<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.show_path(example.path, params) %>" class="" x-tooltip.theme.lookbook="`View in Inspector`">
+ <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) %>"
+ 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>
@@ -19,10 +19,10 @@
<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)) %>"
+ 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