From 87f78e7250ad58c8c7ad271380a7b3ab8769435d Mon Sep 17 00:00:00 2001 From: Kieran Eglin Date: Thu, 29 Feb 2024 12:19:12 -0800 Subject: [PATCH] Added docs; fixed up stragglers --- .../components/custom_components/text_components.ex | 7 +++++-- .../controllers/sources/source_html/index.html.heex | 2 +- .../controllers/media_profile_controller_test.exs | 4 ++-- test/pinchflat_web/controllers/source_controller_test.exs | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/pinchflat_web/components/custom_components/text_components.ex b/lib/pinchflat_web/components/custom_components/text_components.ex index 44b2cb0..e362110 100644 --- a/lib/pinchflat_web/components/custom_components/text_components.ex +++ b/lib/pinchflat_web/components/custom_components/text_components.ex @@ -31,13 +31,16 @@ defmodule PinchflatWeb.CustomComponents.TextComponents do """ end + @doc """ + Renders an icon as a link with the given href. + """ attr :href, :string, required: true attr :icon, :string, required: true attr :class, :string, default: "" - # TODO: docs + def icon_link(assigns) do ~H""" - <.link navigate={@href} class={["hover:text-secondary duration-200 ease-in-out", @class]}> + <.link href={@href} class={["hover:text-secondary duration-200 ease-in-out", @class]}> """ diff --git a/lib/pinchflat_web/controllers/sources/source_html/index.html.heex b/lib/pinchflat_web/controllers/sources/source_html/index.html.heex index e720165..3dbfec2 100644 --- a/lib/pinchflat_web/controllers/sources/source_html/index.html.heex +++ b/lib/pinchflat_web/controllers/sources/source_html/index.html.heex @@ -1,5 +1,5 @@
-

All Sources

+

Sources