berrypod/lib/simpleshop_theme_web/components/shop_components.ex
jamey 3eacd91fda refactor: split shop_components.ex into 5 focused sub-modules
4,487-line monolith → 23-line facade + 5 modules:
- Base (inputs, buttons, cards)
- Layout (header, footer, mobile nav, shop_layout)
- Cart (drawer, items, order summary)
- Product (cards, gallery, variant selector, hero)
- Content (rich text, images, contact, reviews)

`use SimpleshopThemeWeb.ShopComponents` imports all sub-modules.
No single file over ~1,600 lines now.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 14:30:25 +00:00

24 lines
835 B
Elixir

defmodule SimpleshopThemeWeb.ShopComponents do
@moduledoc """
Facade module for shop/storefront UI components.
`use SimpleshopThemeWeb.ShopComponents` imports all sub-modules:
- `Base` — themed inputs, buttons, cards
- `Layout` — header, footer, mobile nav, shop_layout wrapper
- `Cart` — cart drawer, cart items, order summary
- `Product` — product cards, gallery, variant selector, hero sections
- `Content` — rich text, responsive images, contact form, reviews
"""
defmacro __using__(_opts \\ []) do
quote do
import SimpleshopThemeWeb.ShopComponents.Base
import SimpleshopThemeWeb.ShopComponents.Cart
import SimpleshopThemeWeb.ShopComponents.Content
import SimpleshopThemeWeb.ShopComponents.Layout
import SimpleshopThemeWeb.ShopComponents.Product
end
end
end