Current section

Files

Jump to
surface priv templates surface.init demo example02.ex
Raw

priv/templates/surface.init/demo/example02.ex

defmodule <%= inspect(web_module) %>.Components.Hero.Example02 do
@moduledoc """
Example using the `color` property.
"""
use Surface.Catalogue.Example,
subject: <%= inspect(web_module) %>.Components.Hero,
height: "700px",
title: "Colors"
alias <%= inspect(web_module) %>.Components.Hero
def render(assigns) do
~F"""
<Hero
name="John Doe"
subtitle="How are you?"
color="info"
/>
<Hero
name="John Doe"
subtitle="How are you?"
color="warning"
/>
<Hero
name="John Doe"
subtitle="How are you?"
color="danger"
/>
"""
end
end