File: component_preview.rb.tt

package info (click to toggle)
ruby-view-component 4.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 472 kB
  • sloc: ruby: 2,278; makefile: 4
file content (9 lines) | stat: -rw-r--r-- 253 bytes parent folder | download
1
2
3
4
5
6
7
8
9
# frozen_string_literal: true

<% module_namespacing do -%>
class <%= class_name %>ComponentPreview < ViewComponent::Preview
  def default
    render(<%= class_name %>Component.new<%= "(#{render_signature})" if render_signature %>)
  end
end
<% end -%>