Skip to content

Commit

Permalink
Fix rebsing mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
angelikatyborska committed Sep 23, 2024
1 parent 07bbb74 commit b2a46f3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/bitstyles_phoenix/bitstyles.ex
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ defmodule BitstylesPhoenix.Bitstyles do
# for users of older bitstyles to use the "class-name-A" classname.

defp downgrade_classname(class, target_version, _current_version)
when target_version > {5, 0, 1} do
when target_version > {6, 0, 0} do
IO.warn("Version #{Version.to_string(target_version)} of bitstyles is not yet supported")
class
end
Expand All @@ -37,7 +37,7 @@ defmodule BitstylesPhoenix.Bitstyles do
class
end

defp downgrade_classname(class, target_version, {6, 0, 6}) do
defp downgrade_classname(class, target_version, {6, 0, 0}) do
# downgrading 6.0.0 -> 5.0.1
sizes_renaming = %{
"s7" => "4xs",
Expand Down
2 changes: 1 addition & 1 deletion lib/bitstyles_phoenix/component/badge.ex
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ defmodule BitstylesPhoenix.Component.Badge do
extra = assigns_to_attributes(assigns, [:class, :variant])

{variant_class, extra} =
if Bitstyles.version() >= "6.0.0" do
if Bitstyles.Version.version() >= {6, 0, 0} do
theme = assigns[:variant] || "grayscale"
{nil, Keyword.put_new(extra, :"data-theme", theme)}
else
Expand Down
2 changes: 1 addition & 1 deletion lib/bitstyles_phoenix/component/flash.ex
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ defmodule BitstylesPhoenix.Component.Flash do
extra = assigns_to_attributes(assigns, [:class, :content_class, :variant])

{variant_class, extra} =
if Bitstyles.version() >= "6.0.0" do
if Bitstyles.Version.version() >= {6, 0, 0} do
{nil, Keyword.put_new(extra, :"data-theme", Enum.at(flash_variants, 0))}
else
{flash_variants |> Enum.map_join(" ", &"a-flash--#{&1}"), extra}
Expand Down

0 comments on commit b2a46f3

Please sign in to comment.