From 48ff02ca098cc6566cd19efe07fedfa0eae72ff1 Mon Sep 17 00:00:00 2001 From: Hunter Wilkins Date: Sat, 28 Dec 2024 22:16:30 -0500 Subject: [PATCH 1/2] Updated fill and stroke colors to match heroicons.com --- lib/heroicons.ex | 12 ++++++++++-- test/heroicons_test.exs | 28 ++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/lib/heroicons.ex b/lib/heroicons.ex index f157a0b9..7435514f 100644 --- a/lib/heroicons.ex +++ b/lib/heroicons.ex @@ -144,10 +144,10 @@ defmodule Heroicons do ~H""" ]) + assert html =~ ~s(fill="currentcolor") + assert html =~ ~s(stroke="none") + end + + test "renders mini icon with fill of currentColor and no stroke" do + assigns = %{} + html = rendered_to_string(~h[]) + assert html =~ ~s(fill="currentcolor") + assert html =~ ~s(stroke="none") + end + + test "renders solid icon with fill of currentColor and no stroke" do + assigns = %{} + html = rendered_to_string(~h[]) + assert html =~ ~s(fill="currentcolor") + assert html =~ ~s(stroke="none") + end + + test "renders outline icon with no fill and stroke of currentColor" do + assigns = %{} + html = rendered_to_string(~h[]) + assert html =~ ~s(fill="none") + assert html =~ ~s(stroke="currentColor") + end + test "raises when icon name is not found" do assigns = %{} From e64eabfa8c7d0801b38b6935e7c3d7594aed47c3 Mon Sep 17 00:00:00 2001 From: Hunter Wilkins Date: Sat, 28 Dec 2024 22:36:21 -0500 Subject: [PATCH 2/2] fixed tests --- test/heroicons_test.exs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/heroicons_test.exs b/test/heroicons_test.exs index c4aa68e8..74836e11 100644 --- a/test/heroicons_test.exs +++ b/test/heroicons_test.exs @@ -38,28 +38,28 @@ defmodule HeroiconsTest do test "renders micro icon with fill of currentColor and no stroke" do assigns = %{} - html = rendered_to_string(~h[]) - assert html =~ ~s(fill="currentcolor") + html = rendered_to_string(~H[]) + assert html =~ ~s(fill="currentColor") assert html =~ ~s(stroke="none") end test "renders mini icon with fill of currentColor and no stroke" do assigns = %{} - html = rendered_to_string(~h[]) - assert html =~ ~s(fill="currentcolor") + html = rendered_to_string(~H[]) + assert html =~ ~s(fill="currentColor") assert html =~ ~s(stroke="none") end test "renders solid icon with fill of currentColor and no stroke" do assigns = %{} - html = rendered_to_string(~h[]) - assert html =~ ~s(fill="currentcolor") + html = rendered_to_string(~H[]) + assert html =~ ~s(fill="currentColor") assert html =~ ~s(stroke="none") end test "renders outline icon with no fill and stroke of currentColor" do assigns = %{} - html = rendered_to_string(~h[]) + html = rendered_to_string(~H[]) assert html =~ ~s(fill="none") assert html =~ ~s(stroke="currentColor") end