mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 14:01:37 +00:00
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:
parent
e124d8a227
commit
d99e918e55
2 changed files with 9 additions and 2 deletions
|
|
@ -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]),
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue