Skip to content

Commit

Permalink
fix: default in attr ensures default values
Browse files Browse the repository at this point in the history
  • Loading branch information
TwistingTwists committed May 5, 2024
1 parent b2ec37f commit b7e5304
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 b7e5304

Please sign in to comment.