first chicken and egg

This commit is contained in:
2023-04-16 21:32:56 +02:00
parent 59f6d3dace
commit d1c9fcefff
6 changed files with 73 additions and 265 deletions

View File

@ -0,0 +1,19 @@
defmodule ChickenEggWeb.ChickenComponents do
use ChickenEggWeb, :html
def chicken(assigns) do
~H"""
<div class="w-32 h-32 absolute" style={"top: #{@y}px; left: #{@x}px;"}>
<img src={~p"/images/chicken.svg"} />
</div>
"""
end
def egg(assigns) do
~H"""
<div class="w-12 h-12 absolute" style={"top: #{@y}px; left: #{@x}px;"}>
<img src={~p"/images/egg.svg"} />
</div>
"""
end
end