From 3c4f9dc838f4449ec5883a9b3145cdc7f246d499 Mon Sep 17 00:00:00 2001 From: Adam Wheatley Date: Mon, 9 Sep 2024 07:46:18 +0000 Subject: [PATCH] Added component preview --- .../components/cms_page_title_component_preview.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 previews/components/cms_page_title_component_preview.rb diff --git a/previews/components/cms_page_title_component_preview.rb b/previews/components/cms_page_title_component_preview.rb new file mode 100644 index 0000000000..93210e8ad5 --- /dev/null +++ b/previews/components/cms_page_title_component_preview.rb @@ -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