Enhance TextInput and ConfirmingPage layout

- Added textXAlignment property to TextInput for customizable text alignment.
- Updated ConfirmingPage to set textXAlignment to Left and adjusted size and position of the TextInput, improving layout and user experience.
This commit is contained in:
Joe 2026-02-02 17:55:12 -06:00
parent e124d8a227
commit d99e918e55
2 changed files with 9 additions and 2 deletions

View file

@ -92,6 +92,7 @@ function TextInput:render()
textInputTheme.Enabled.PlaceholderColor
),
TextSize = theme.TextSize.Large,
TextXAlignment = self.props.textXAlignment or Enum.TextXAlignment.Center,
TextEditable = self.props.enabled,
ClearTextOnFocus = self.props.clearTextOnFocus,
@ -118,6 +119,11 @@ function TextInput:render()
self.props.onChanged(rbx.Text)
end
end,
}, {
Padding = e("UIPadding", {
PaddingLeft = UDim.new(0, 6),
PaddingRight = UDim.new(0, 6),
}),
}),
Children = Roact.createFragment(self.props[Roact.Children]),
})

View file

@ -145,8 +145,9 @@ function ConfirmingPage:render()
placeholder = "Filter",
enabled = true,
transparency = self.props.transparency,
size = UDim2.new(0.5, -5, 1, 0),
position = UDim2.new(0.5, 5, 0, 0),
textXAlignment = Enum.TextXAlignment.Left,
size = UDim2.new(0.25, -5, 1, 0),
position = UDim2.new(0.75, 5, 0, 0),
onChanged = function(text)
self:setState({ filterText = text })
end,