Skip to content

Commit

Permalink
fix: default in attr ensures default values (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgreg authored May 5, 2024
2 parents b2ec37f + b7e5304 commit 2cd6f71
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
7 changes: 0 additions & 7 deletions lib/bloom/components/marquee.ex
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ defmodule Bloom.Components.Marquee do
slot(:inner_block, required: true)

def marquee(assigns) do
assigns =
assigns
|> assign(:repeat, assigns[:repeat] || 4)
|> assign(:vertical, assigns[:vertical] || false)
|> assign(:pause_on_hover, assigns[:pause_on_hover] || false)
|> assign(:reverse, assigns[:reverse] || false)

~H"""
<div
:if={@repeat > 0}
Expand Down
7 changes: 0 additions & 7 deletions priv/templates/marquee.ex
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ defmodule <%= @module_name %>Web.Components.Marquee do
slot(:inner_block, required: true)

def marquee(assigns) do
assigns =
assigns
|> assign(:repeat, assigns[:repeat] || 4)
|> assign(:vertical, assigns[:vertical] || false)
|> assign(:pause_on_hover, assigns[:pause_on_hover] || false)
|> assign(:reverse, assigns[:reverse] || false)

~H"""
<div
:if={@repeat > 0}
Expand Down

0 comments on commit 2cd6f71

Please sign in to comment.