[Housekeeping] Bump Phoenix LiveView to 1.0.0 (#495)
* bumped liveview to 1.0.0 * Converted interpolation to new syntax
This commit is contained in:
@@ -37,7 +37,7 @@ defmodule PinchflatWeb.CustomComponents.ButtonComponents do
|
||||
disabled={@disabled}
|
||||
{@rest}
|
||||
>
|
||||
<%= render_slot(@inner_block) %>
|
||||
{render_slot(@inner_block)}
|
||||
</button>
|
||||
"""
|
||||
end
|
||||
@@ -66,7 +66,7 @@ defmodule PinchflatWeb.CustomComponents.ButtonComponents do
|
||||
"font-medium text-white hover:bg-opacity-95"
|
||||
]}
|
||||
>
|
||||
<%= @text %>
|
||||
{@text}
|
||||
<CoreComponents.icon
|
||||
name="hero-chevron-down"
|
||||
class="fill-current duration-200 ease-linear mt-1"
|
||||
@@ -81,7 +81,7 @@ defmodule PinchflatWeb.CustomComponents.ButtonComponents do
|
||||
<ul class="flex flex-col">
|
||||
<li :for={option <- @option}>
|
||||
<span class="flex px-5 py-2 font-medium text-bodydark2 hover:text-white cursor-pointer">
|
||||
<%= render_slot(option) %>
|
||||
{render_slot(option)}
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -126,7 +126,7 @@ defmodule PinchflatWeb.CustomComponents.ButtonComponents do
|
||||
>
|
||||
<span class="border-light absolute -top-1 left-1/2 -z-10 h-2 w-2 -translate-x-1/2 rotate-45 rounded-sm bg-meta-4">
|
||||
</span>
|
||||
<span><%= @tooltip %></span>
|
||||
<span>{@tooltip}</span>
|
||||
</div>
|
||||
</div>
|
||||
"""
|
||||
|
||||
@@ -34,16 +34,16 @@ defmodule PinchflatWeb.CustomComponents.TabComponents do
|
||||
x-bind:class={"openTab === '#{tab.id}' ? activeClasses : inactiveClasses"}
|
||||
class="border-b-2 py-4 w-full sm:w-fit text-sm font-medium hover:text-meta-5 md:text-base"
|
||||
>
|
||||
<span class="text-xl"><%= tab.title %></span>
|
||||
<span class="text-xl">{tab.title}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="mx-4 my-4 lg:my-0 flex gap-5 sm:gap-10 items-center">
|
||||
<%= render_slot(@tab_append) %>
|
||||
{render_slot(@tab_append)}
|
||||
</div>
|
||||
</header>
|
||||
<div class="mt-4 min-h-60">
|
||||
<div :for={tab <- @tab} x-show={"openTab === '#{tab.id}'"} class="font-medium leading-relaxed">
|
||||
<%= render_slot(tab) %>
|
||||
{render_slot(tab)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -32,7 +32,7 @@ defmodule PinchflatWeb.CustomComponents.TableComponents do
|
||||
<thead>
|
||||
<tr class="text-left bg-meta-4">
|
||||
<th :for={col <- @col} class="px-4 py-4 font-medium text-white xl:pl-11">
|
||||
<%= col[:label] %>
|
||||
{col[:label]}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -45,7 +45,7 @@ defmodule PinchflatWeb.CustomComponents.TableComponents do
|
||||
col[:class]
|
||||
]}
|
||||
>
|
||||
<%= render_slot(col, @row_item.(row)) %>
|
||||
{render_slot(col, @row_item.(row))}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -12,7 +12,7 @@ defmodule PinchflatWeb.CustomComponents.TextComponents do
|
||||
def inline_code(assigns) do
|
||||
~H"""
|
||||
<code class="inline-block text-sm font-mono text-gray bg-boxdark rounded-md p-0.5 mx-0.5 text-nowrap">
|
||||
<%= render_slot(@inner_block) %>
|
||||
{render_slot(@inner_block)}
|
||||
</code>
|
||||
"""
|
||||
end
|
||||
@@ -26,7 +26,7 @@ defmodule PinchflatWeb.CustomComponents.TextComponents do
|
||||
def inline_link(assigns) do
|
||||
~H"""
|
||||
<.link href={@href} target="_blank" class="text-blue-500 hover:text-blue-300">
|
||||
<%= render_slot(@inner_block) %>
|
||||
{render_slot(@inner_block)}
|
||||
</.link>
|
||||
"""
|
||||
end
|
||||
@@ -41,7 +41,7 @@ defmodule PinchflatWeb.CustomComponents.TextComponents do
|
||||
def subtle_link(assigns) do
|
||||
~H"""
|
||||
<.link href={@href} target={@target} class="underline decoration-bodydark decoration-1 hover:decoration-white">
|
||||
<%= render_slot(@inner_block) %>
|
||||
{render_slot(@inner_block)}
|
||||
</.link>
|
||||
"""
|
||||
end
|
||||
@@ -82,7 +82,7 @@ defmodule PinchflatWeb.CustomComponents.TextComponents do
|
||||
assigns = Map.put(assigns, :text, formatted_text)
|
||||
|
||||
~H"""
|
||||
<span><%= @text %></span>
|
||||
<span>{@text}</span>
|
||||
"""
|
||||
end
|
||||
|
||||
@@ -98,7 +98,7 @@ defmodule PinchflatWeb.CustomComponents.TextComponents do
|
||||
assigns = Map.put(assigns, :timezone, timezone)
|
||||
|
||||
~H"""
|
||||
<time><%= Calendar.strftime(Timex.Timezone.convert(@datetime, @timezone), @format) %></time>
|
||||
<time>{Calendar.strftime(Timex.Timezone.convert(@datetime, @timezone), @format)}</time>
|
||||
"""
|
||||
end
|
||||
|
||||
@@ -109,7 +109,7 @@ defmodule PinchflatWeb.CustomComponents.TextComponents do
|
||||
|
||||
def localized_number(assigns) do
|
||||
~H"""
|
||||
<span x-data x-text={"Intl.NumberFormat().format(#{@number})"}><%= @number %></span>
|
||||
<span x-data x-text={"Intl.NumberFormat().format(#{@number})"}>{@number}</span>
|
||||
"""
|
||||
end
|
||||
|
||||
@@ -122,7 +122,7 @@ defmodule PinchflatWeb.CustomComponents.TextComponents do
|
||||
|
||||
def pluralize(assigns) do
|
||||
~H"""
|
||||
<%= @word %><%= if @count == 1, do: "", else: @suffix %>
|
||||
{@word}{if @count == 1, do: "", else: @suffix}
|
||||
"""
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user