2022-03-26 10:17:01 +13:00
|
|
|
defmodule AshHqWeb.Components.CalloutText do
|
2022-08-07 11:22:58 +12:00
|
|
|
@moduledoc "Highlights some text on the page"
|
2022-03-26 10:17:01 +13:00
|
|
|
use Surface.Component
|
|
|
|
|
2022-10-12 08:19:19 +13:00
|
|
|
import Tails
|
2022-09-09 16:31:50 +12:00
|
|
|
|
|
|
|
prop text, :string, required: true
|
2022-10-05 09:24:14 +13:00
|
|
|
prop class, :css_class
|
2022-09-09 16:31:50 +12:00
|
|
|
|
|
|
|
def render(%{__context__: %{platform: :ios}} = assigns) do
|
|
|
|
~F"""
|
|
|
|
<text color={primary_light_600()}>{@text}</text>
|
|
|
|
"""
|
|
|
|
end
|
2022-03-26 10:17:01 +13:00
|
|
|
|
|
|
|
def render(assigns) do
|
|
|
|
~F"""
|
2022-10-12 08:19:19 +13:00
|
|
|
<span class={classes(["text-primary-light-600 dark:text-primary-dark-400 font-bold", @class])}>
|
2022-09-09 16:31:50 +12:00
|
|
|
{@text}
|
2022-03-26 10:17:01 +13:00
|
|
|
</span>
|
|
|
|
"""
|
|
|
|
end
|
|
|
|
end
|