Add Elixir example files

pull/816/head
crbelaus 2024-11-18 13:29:51 +07:00 committed by Wilfred Hughes
parent d42797fa7e
commit c5527634b8
2 changed files with 26 additions and 0 deletions

@ -0,0 +1,13 @@
defmodule ExampleComponent do
defp greet do
"Hello world"
end
def greet_component(assigns) do
~H"""
<p class="title">
<%= greet() %>
</p>
"""
end
end

@ -0,0 +1,13 @@
defmodule ExampleComponent do
defp greet_str do
"Hello world!"
end
def greet_component(assigns) do
~H"""
<p class="title new-class">
<b><%= greet_str() %></b>
</p>
"""
end
end