mirror of
https://github.com/eduardolat/pgbackweb.git
synced 2026-01-28 23:49:41 -06:00
Refactor input control to include pattern attribute
This commit is contained in:
@@ -18,6 +18,7 @@ type InputControlParams struct {
|
||||
HelpText string
|
||||
Color color
|
||||
AutoComplete string
|
||||
Pattern string
|
||||
Children []gomponents.Node
|
||||
HelpButtonChildren []gomponents.Node
|
||||
}
|
||||
@@ -73,6 +74,10 @@ func InputControl(params InputControlParams) gomponents.Node {
|
||||
params.AutoComplete != "",
|
||||
html.AutoComplete(params.AutoComplete),
|
||||
),
|
||||
gomponents.If(
|
||||
params.Pattern != "",
|
||||
html.Pattern(params.Pattern),
|
||||
),
|
||||
gomponents.Group(params.Children),
|
||||
),
|
||||
gomponents.If(
|
||||
|
||||
Reference in New Issue
Block a user