Skip to content

Commit

Permalink
CoreComponents update for curly brace expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
bcardarella committed Dec 7, 2024
1 parent 1cdccb3 commit 9a51850
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions priv/templates/lvn.swiftui.gen/core_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ defmodule <%= inspect context.web_module %>.CoreComponents.<%= inspect context.m
~LVN"""
<VStack alignment="leading">
<LabeledContent>
<Text template="label"><%%= @label %></Text>
<Text template="label">{@label}</Text>
<TextFieldLink id={@id} name={@name} value={@value} prompt={@prompt} {@rest}>
<%%= @label %>
{@label}
</TextFieldLink>
</LabeledContent>
<.error :for={msg <- @errors}><%%= msg %></.error>
<.error :for={msg <- @errors}>{msg}</.error>
</VStack>
"""
end
Expand All @@ -134,9 +134,9 @@ defmodule <%= inspect context.web_module %>.CoreComponents.<%= inspect context.m
~LVN"""
<VStack alignment="leading">
<DatePicker id={@id} name={@name} selection={@value} {@rest}>
<%%= @label %>
{@label}
</DatePicker>
<.error :for={msg <- @errors}><%%= msg %></.error>
<.error :for={msg <- @errors}>{msg}</.error>
</VStack>
"""
end
Expand All @@ -145,10 +145,10 @@ defmodule <%= inspect context.web_module %>.CoreComponents.<%= inspect context.m
~LVN"""
<VStack alignment="leading">
<LabeledContent>
<Text template="label"><%%= @label %></Text>
<MultiDatePicker id={@id} name={@name} selection={@value} {@rest}><%%= @label %></MultiDatePicker>
<Text template="label">{@label}</Text>
<MultiDatePicker id={@id} name={@name} selection={@value} {@rest}>{@label}</MultiDatePicker>
</LabeledContent>
<.error :for={msg <- @errors}><%%= msg %></.error>
<.error :for={msg <- @errors}>{msg}</.error>
</VStack>
"""
end
Expand All @@ -157,15 +157,15 @@ defmodule <%= inspect context.web_module %>.CoreComponents.<%= inspect context.m
~LVN"""
<VStack alignment="leading">
<Picker id={@id} name={@name} selection={@value} {@rest}>
<Text template="label"><%%= @label %></Text>
<Text template="label">{@label}</Text>
<Text
:for={{name, value} <- @options}
tag={value}
>
<%%= name %>
{name}
</Text>
</Picker>
<.error :for={msg <- @errors}><%%= msg %></.error>
<.error :for={msg <- @errors}>{msg}</.error>
</VStack>
"""
end
Expand All @@ -174,10 +174,10 @@ defmodule <%= inspect context.web_module %>.CoreComponents.<%= inspect context.m
~LVN"""
<VStack alignment="leading">
<LabeledContent>
<Text template="label"><%%= @label %></Text>
<Slider id={@id} name={@name} value={@value} lowerBound={@min} upperBound={@max} {@rest}><%%= @label %></Slider>
<Text template="label">{@label}</Text>
<Slider id={@id} name={@name} value={@value} lowerBound={@min} upperBound={@max} {@rest}>{@label}</Slider>
</LabeledContent>
<.error :for={msg <- @errors}><%%= msg %></.error>
<.error :for={msg <- @errors}>{msg}</.error>
</VStack>
"""
end
Expand All @@ -186,10 +186,10 @@ defmodule <%= inspect context.web_module %>.CoreComponents.<%= inspect context.m
~LVN"""
<VStack alignment="leading">
<LabeledContent>
<Text template="label"><%%= @label %></Text>
<Text template="label">{@label}</Text>
<Stepper id={@id} name={@name} value={@value} {@rest}></Stepper>
</LabeledContent>
<.error :for={msg <- @errors}><%%= msg %></.error>
<.error :for={msg <- @errors}>{msg}</.error>
</VStack>
"""
end
Expand All @@ -198,10 +198,10 @@ defmodule <%= inspect context.web_module %>.CoreComponents.<%= inspect context.m
~LVN"""
<VStack alignment="leading">
<LabeledContent>
<Text template="label"><%%= @label %></Text>
<Text template="label">{@label}</Text>
<TextEditor id={@id} name={@name} text={@value} {@rest} />
</LabeledContent>
<.error :for={msg <- @errors}><%%= msg %></.error>
<.error :for={msg <- @errors}>{msg}</.error>
</VStack>
"""
end
Expand All @@ -210,7 +210,7 @@ defmodule <%= inspect context.web_module %>.CoreComponents.<%= inspect context.m
~LVN"""
<VStack alignment="leading">
<TextField id={@id} name={@name} text={@value} prompt={@prompt} {@rest}><%%= @placeholder || @label %></TextField>
<.error :for={msg <- @errors}><%%= msg %></.error>
<.error :for={msg <- @errors}>{msg}</.error>
</VStack>
"""
end
Expand All @@ -219,7 +219,7 @@ defmodule <%= inspect context.web_module %>.CoreComponents.<%= inspect context.m
~LVN"""
<VStack alignment="leading">
<SecureField id={@id} name={@name} text={@value} prompt={@prompt} {@rest}><%%= @placeholder || @label %></SecureField>
<.error :for={msg <- @errors}><%%= msg %></.error>
<.error :for={msg <- @errors}>{msg}</.error>
</VStack>
"""
end
Expand All @@ -228,10 +228,10 @@ defmodule <%= inspect context.web_module %>.CoreComponents.<%= inspect context.m
~LVN"""
<VStack alignment="leading">
<LabeledContent>
<Text template="label"><%%= @label %></Text>
<Text template="label">{@label}</Text>
<Toggle id={@id} name={@name} isOn={Map.get(assigns, :checked, Map.get(assigns, :value))} {@rest}></Toggle>
</LabeledContent>
<.error :for={msg <- @errors}><%%= msg %></.error>
<.error :for={msg <- @errors}>{msg}</.error>
</VStack>
"""
end
Expand Down Expand Up @@ -351,7 +351,7 @@ defmodule <%= inspect context.web_module %>.CoreComponents.<%= inspect context.m
id={@id}
{@rest}
>
<Text template="message"><%%= msg %></Text>
<Text template="message">{msg}</Text>
<Button template="actions" phx-click="lv:clear-flash" phx-value-key={@kind}>OK</Button>
</VStack>
"""
Expand Down

0 comments on commit 9a51850

Please sign in to comment.