Class: RailsDevtools::Components::PageContent
- Inherits:
-
ApplicationComponent
- Object
- Phlex::HTML
- ApplicationComponent
- RailsDevtools::Components::PageContent
- Defined in:
- app/views/rails_devtools/components/page_content.rb
Instance Method Summary collapse
- #page_title(&block) ⇒ Object
- #results(&block) ⇒ Object
- #search_form(form:, path:, method: :get) ⇒ Object
- #view_template(&block) ⇒ Object
Methods inherited from ApplicationComponent
Instance Method Details
#page_title(&block) ⇒ Object
10 11 12 13 |
# File 'app/views/rails_devtools/components/page_content.rb', line 10 def page_title(&block) content_for(:title) { "Rails Devtools - #{block.call}" } h1(class: "text-2xl font-bold", &block) end |
#results(&block) ⇒ Object
23 24 25 |
# File 'app/views/rails_devtools/components/page_content.rb', line 23 def results(&block) div(class: "mt-4", &block) end |
#search_form(form:, path:, method: :get) ⇒ Object
15 16 17 18 19 20 21 |
# File 'app/views/rails_devtools/components/page_content.rb', line 15 def search_form(form:, path:, method: :get) render Components::Ui::SearchForm.new( form: form, path: path, method: method ) end |
#view_template(&block) ⇒ Object
6 7 8 |
# File 'app/views/rails_devtools/components/page_content.rb', line 6 def view_template(&block) turbo_frame_tag("page_content", &block) end |