Skip to content

Commit fd3231a

Browse files
carson-katrisupernintendo
authored andcommitted
Minor fixes for modifier constructors
1 parent 558240b commit fd3231a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/live_view_native_swift_ui/modifiers/images/image_scale.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ defmodule LiveViewNativeSwiftUi.Modifiers.ImageScale do
55
field :scale, Ecto.Enum, values: ~w(small medium large)a
66
end
77

8-
def params(scale) when is_atom(scale) and not is_boolean(scale) and not is_nil(scale) , do: [scale: scale]
8+
def params(scale) when is_atom(scale) and not is_boolean(scale) and not is_nil(scale), do: [scale: scale]
99
def params(params), do: params
1010
end

lib/live_view_native_swift_ui/modifiers/layout_fundamentals/z_index.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ defmodule LiveViewNativeSwiftUi.Modifiers.ZIndex do
55
field :value, :float
66
end
77

8-
def params(z_index) when is_float(z_index), do: [z_index: z_index]
8+
def params(value) when is_number(value), do: [value: value]
99
def params(params), do: params
1010
end

lib/live_view_native_swift_ui/modifiers/view_configuration/opacity.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ defmodule LiveViewNativeSwiftUi.Modifiers.Opacity do
55
field :opacity, :float
66
end
77

8-
def params(opacity) when is_float(opacity), do: [opacity: opacity]
8+
def params(opacity) when is_number(opacity), do: [opacity: opacity]
99
def params(params), do: params
1010
end

0 commit comments

Comments
 (0)