first chicken and egg
This commit is contained in:
19
lib/chicken_egg_web/components/chicken_components.ex
Normal file
19
lib/chicken_egg_web/components/chicken_components.ex
Normal 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
|
Reference in New Issue
Block a user