Responsive UI improvements (#41)
* Improved responsive UX for media profiles * Improved responsiveness for other pages * Added docs; fixed up stragglers
This commit is contained in:
@@ -2,6 +2,8 @@ defmodule PinchflatWeb.CustomComponents.TextComponents do
|
||||
@moduledoc false
|
||||
use Phoenix.Component
|
||||
|
||||
alias PinchflatWeb.CoreComponents
|
||||
|
||||
@doc """
|
||||
Renders a code block with the given content.
|
||||
"""
|
||||
@@ -28,4 +30,19 @@ defmodule PinchflatWeb.CustomComponents.TextComponents do
|
||||
</.link>
|
||||
"""
|
||||
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: ""
|
||||
|
||||
def icon_link(assigns) do
|
||||
~H"""
|
||||
<.link href={@href} class={["hover:text-secondary duration-200 ease-in-out", @class]}>
|
||||
<CoreComponents.icon name={@icon} />
|
||||
</.link>
|
||||
"""
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user