app/views/property_instructions/show.html.erb
<%= render(PageComponent.new(subject: @property, sidebar: true, tabs: TabsComponent.new(tabs: property_tabs(@property)))) do |component| %>
<% component.with(:header) do %>
<%= render(Page::HeaderComponent.new(title: @property.name, sidebar: true, datepicker: true, buttons: [
layout_button(link: new_property_path, icon: "fas fa-plus", title: "New property"),
layout_button(link: new_property_path(clone: @property.id), icon: "fad fa-copy", title: "Clone property")
])) %>
<% end %>
<% component.with(:body) do %>
<div class="border rounded p-1" style="background-color: #151515;">
<%= tag.iframe("Loading...",
src: nil,
title: "CodeSandbox embed",
style: "width: 100%; height: 550px; border: 0; padding: 0; overflow:hidden;",
sandbox: "allow-modals allow-forms allow-popups allow-scripts allow-same-origin",
data: {
controller: "code-sandbox-embed",
url: advertisements_url(@property.id, format: :js)
}
) %>
</div>
<% end %>
<% end %>