Rails Integration
<%= link_to product_path(product), class: 'product-teaser' do %>
<div>
<h2><%= product.name %></h2>
<p><%= product.description %></p>
<b><%= product.price %></b>
</div>
<% end %>class Components::Products::Teaser < Matestack::Ui::Component
requires :product
def response
link path: product_path(product), class: 'product-teaser' do
div do
heading size: 2, text: product.name
paragraph text: product.description
b text: product.price
end
end
end
endLast updated
Was this helpful?