Skip to content

Commit

Permalink
Added component preview
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Wheeto committed Sep 9, 2024
1 parent 9dbde40 commit 3c4f9dc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions previews/components/cms_page_title_component_preview.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class CmsPageTitleComponentPreview < ViewComponent::Preview
layout "full-width"

def default
render(CmsPageTitleComponent.new(title: "Page title", intro_text: nil))
end

def with_intro_text
render(CmsPageTitleComponent.new(title: "Page title", intro_text: "Welcome to the page"))
end
end

0 comments on commit 3c4f9dc

Please sign in to comment.