Skip to content

Commit

Permalink
Only spin loading spinners if user does not prefer reduced motion (#5919
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mattmatters authored Sep 1, 2024
1 parent 76f2ea3 commit 19b68e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions installer/templates/phx_web/components/core_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
hidden
>
<%= maybe_eex_gettext.("Attempting to reconnect", @gettext) %>
<.icon name="hero-arrow-path" class="ml-1 h-3 w-3 animate-spin" />
<.icon name="hero-arrow-path" class="ml-1 h-3 w-3 motion-safe:animate-spin" />
</.flash>
<.flash
Expand All @@ -100,7 +100,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
hidden
>
<%= maybe_eex_gettext.("Hang in there while we get back on track", @gettext) %>
<.icon name="hero-arrow-path" class="ml-1 h-3 w-3 animate-spin" />
<.icon name="hero-arrow-path" class="ml-1 h-3 w-3 motion-safe:animate-spin" />
</.flash>
</div>
"""
Expand Down Expand Up @@ -516,7 +516,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
## Examples
<.icon name="hero-x-mark-solid" />
<.icon name="hero-arrow-path" class="ml-1 w-3 h-3 animate-spin" />
<.icon name="hero-arrow-path" class="ml-1 w-3 h-3 motion-safe:animate-spin" />
"""
attr :name, :string, required: true
attr :class, :string, default: nil
Expand Down
6 changes: 3 additions & 3 deletions priv/templates/phx.gen.live/core_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
hidden
>
<%= maybe_eex_gettext.("Attempting to reconnect", @gettext) %>
<.icon name="hero-arrow-path" class="ml-1 h-3 w-3 animate-spin" />
<.icon name="hero-arrow-path" class="ml-1 h-3 w-3 motion-safe:animate-spin" />
</.flash>
<.flash
Expand All @@ -100,7 +100,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
hidden
>
<%= maybe_eex_gettext.("Hang in there while we get back on track", @gettext) %>
<.icon name="hero-arrow-path" class="ml-1 h-3 w-3 animate-spin" />
<.icon name="hero-arrow-path" class="ml-1 h-3 w-3 motion-safe:animate-spin" />
</.flash>
</div>
"""
Expand Down Expand Up @@ -516,7 +516,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
## Examples
<.icon name="hero-x-mark-solid" />
<.icon name="hero-arrow-path" class="ml-1 w-3 h-3 animate-spin" />
<.icon name="hero-arrow-path" class="ml-1 w-3 h-3 motion-safe:animate-spin" />
"""
attr :name, :string, required: true
attr :class, :string, default: nil
Expand Down

0 comments on commit 19b68e1

Please sign in to comment.