From 7c9fd9932e4c9d589b91075a6ec153abb08179bd Mon Sep 17 00:00:00 2001 From: Diego Toral Date: Tue, 6 Feb 2024 17:09:48 -0800 Subject: [PATCH] Update Bulma::BoxComponent to use view --- CHANGELOG.md | 1 + previews/elements/box_component_preview.rb | 3 --- .../elements/box_component_preview/with_text_content.html.erb | 3 +++ 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 previews/elements/box_component_preview/with_text_content.html.erb diff --git a/CHANGELOG.md b/CHANGELOG.md index 0df19e7..5648d34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## [Unreleased] +- Converted preview for `Bulma::BoxComponent` to use view file - Converted default preview for `Bulma::ProgressBarComponent` to use view file - Added support to specify content as first arggument to `Bulma::TitleComponent` - Drop supoort for Ruby 2,7 diff --git a/previews/elements/box_component_preview.rb b/previews/elements/box_component_preview.rb index 83da529..254ba7b 100644 --- a/previews/elements/box_component_preview.rb +++ b/previews/elements/box_component_preview.rb @@ -2,8 +2,5 @@ class Elements::BoxComponentPreview < ViewComponent::Preview def with_text_content - render(Bulma::BoxComponent.new) do - "I'm in a box." - end end end diff --git a/previews/elements/box_component_preview/with_text_content.html.erb b/previews/elements/box_component_preview/with_text_content.html.erb new file mode 100644 index 0000000..f86731b --- /dev/null +++ b/previews/elements/box_component_preview/with_text_content.html.erb @@ -0,0 +1,3 @@ +<%= bulma_box do %> + I'm a box +<% end %>