refactor: add themed form components for consistent shop styling

Adds reusable Phoenix components (shop_input, shop_textarea, shop_select,
shop_button, shop_card) backed by semantic CSS classes (.themed-input,
.themed-button, etc.) to eliminate repeated inline styles across templates.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-25 19:09:49 +00:00
parent 1b12dc3e7f
commit 7d5896a1e3
7 changed files with 380 additions and 178 deletions

View File

@@ -205,16 +205,13 @@ defmodule SimpleshopThemeWeb.ShopLive.Collection do
</nav>
<form phx-change="sort_changed">
<select
<.shop_select
name="sort"
options={@sort_options}
selected={@current_sort}
class="px-4 py-2 text-sm"
style="background-color: var(--t-surface-raised); color: var(--t-text-primary); border: 1px solid var(--t-border-default); border-radius: var(--t-radius-input);"
aria-label="Sort products"
>
<%= for {value, label} <- @sort_options do %>
<option value={value} selected={@current_sort == value}>{label}</option>
<% end %>
</select>
/>
</form>
</div>
"""