From b998bb2c831e9dd1fd23781070f7707abfd00ff4 Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Thu, 16 May 2024 00:57:09 +0000 Subject: [PATCH] Inline warning --- app/assets/images/tailwind/warning.svg | 4 ---- app/components/tailwind/alert_component.html.erb | 4 +++- app/components/tailwind/icon.html.erb | 6 ++++++ 3 files changed, 9 insertions(+), 5 deletions(-) delete mode 100644 app/assets/images/tailwind/warning.svg diff --git a/app/assets/images/tailwind/warning.svg b/app/assets/images/tailwind/warning.svg deleted file mode 100644 index 8c676b0a1..000000000 --- a/app/assets/images/tailwind/warning.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/components/tailwind/alert_component.html.erb b/app/components/tailwind/alert_component.html.erb index c1d2627e1..9914b4d72 100644 --- a/app/components/tailwind/alert_component.html.erb +++ b/app/components/tailwind/alert_component.html.erb @@ -11,7 +11,9 @@ <%= render Tailwind::Icon.new(name: :clapping) %> <% when :warning %> - <%= image_tag "tailwind/warning.svg", class: "mr-5", alt: "Warning" %> +
+ <%= render Tailwind::Icon.new(name: :warning) %> +
<% else %> <% raise "Invalid value for type: #{type}" %> <% end %> diff --git a/app/components/tailwind/icon.html.erb b/app/components/tailwind/icon.html.erb index c7302602b..f7f4484f5 100644 --- a/app/components/tailwind/icon.html.erb +++ b/app/components/tailwind/icon.html.erb @@ -57,6 +57,12 @@ +<% when :warning %> + <%# TODO: Don't hardcode warning colour %> + + + + <% else %> <% raise "Unexpected name #{@name}" %> <% end %>