File: component_preview.rb.tt

package info (click to toggle)
ruby-view-component 4.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,832 kB
  • sloc: ruby: 8,385; sh: 166; 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 -%>