From 5a95937e6febfba160d14a786bcc6f3dc038773a Mon Sep 17 00:00:00 2001 From: sarahcrack <73823091+sarahcrack@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:33:35 +0000 Subject: [PATCH] removed border_class from component; border_color can now be interpolated directly within the html class --- app/components/content/results_box_component.html.erb | 2 +- app/components/content/results_box_component.rb | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/components/content/results_box_component.html.erb b/app/components/content/results_box_component.html.erb index 94cd262d2d..a4840de3d9 100644 --- a/app/components/content/results_box_component.html.erb +++ b/app/components/content/results_box_component.html.erb @@ -4,7 +4,7 @@ <%= title %> <% end %> -
+

<%= heading %>

diff --git a/app/components/content/results_box_component.rb b/app/components/content/results_box_component.rb index e5bccf38f5..32237aab22 100644 --- a/app/components/content/results_box_component.rb +++ b/app/components/content/results_box_component.rb @@ -1,6 +1,6 @@ module Content class ResultsBoxComponent < ViewComponent::Base - attr_reader :title, :heading, :fee, :course_length, :funding, :text, :link_text, :link_target, :border_color, :show_title + attr_reader :title, :heading, :fee, :course_length, :funding, :text, :link_text, :link_target, :border_color include ContentHelper @@ -17,9 +17,5 @@ def initialize(heading:, fee:, course_length:, funding:, text:, link_text:, link @link_target = link_target @border_color = border_color end - - def border_class - @border_color == :yellow ? "results-box--yellow" : "results-box--grey" - end end end