2023-07-04 14:52:48 +12:00
|
|
|
defmodule AshHqWeb.Components.Feature do
|
|
|
|
@moduledoc "A feature in the home page feature exposè"
|
2024-04-03 09:38:44 +13:00
|
|
|
use Phoenix.Component
|
2023-07-04 14:52:48 +12:00
|
|
|
|
|
|
|
import AshHqWeb.Tails
|
|
|
|
|
2024-04-03 09:38:44 +13:00
|
|
|
attr :name, :string, required: true
|
|
|
|
attr :class, :string, default: nil
|
2023-07-04 14:52:48 +12:00
|
|
|
|
2024-04-03 09:38:44 +13:00
|
|
|
slot :icon
|
|
|
|
slot :description
|
2023-07-04 14:52:48 +12:00
|
|
|
|
2024-04-03 09:38:44 +13:00
|
|
|
def feature(assigns) do
|
|
|
|
~H"""
|
2023-07-04 14:52:48 +12:00
|
|
|
<div class="flex flex-col items-center">
|
|
|
|
<div class={classes(["w-16 h-16 text-primary-light-600 dark:text-primary-dark-400", @class])}>
|
2024-04-03 09:38:44 +13:00
|
|
|
<%= render_slot(@icon) %>
|
2023-07-04 14:52:48 +12:00
|
|
|
</div>
|
|
|
|
<div class="font-bold text-3xl mt-4">
|
2024-04-03 09:38:44 +13:00
|
|
|
<%= @name %>
|
2023-07-04 14:52:48 +12:00
|
|
|
</div>
|
|
|
|
<div class="text-xl mt-4">
|
2024-04-03 09:38:44 +13:00
|
|
|
<%= render_slot(@description) %>
|
2023-07-04 14:52:48 +12:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
"""
|
|
|
|
end
|
|
|
|
end
|