mirror of https://github.com/Wilfred/difftastic/
Add Elixir example files
parent
d42797fa7e
commit
c5527634b8
@ -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
|
||||
Loading…
Reference in New Issue