mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-24 06:34:09 +00:00
Refactor DomLabel and SelectionOption components for improved readability
- Simplified conditional logic for caret visibility in the SelectionOption component. - Enhanced the rendering logic in the ConfirmingPage to improve clarity and maintainability. - Updated the Abort button rendering to use a more concise syntax for conditional display.
This commit is contained in:
parent
af65056c44
commit
a8752b6b8d
2 changed files with 18 additions and 19 deletions
|
|
@ -163,13 +163,15 @@ function ConfirmingPage:render()
|
|||
BackgroundTransparency = 1,
|
||||
}, {
|
||||
-- Only show Abort button when there are changes
|
||||
Abort = if hasChanges then e(TextButton, {
|
||||
text = "Abort",
|
||||
style = "Bordered",
|
||||
transparency = self.props.transparency,
|
||||
layoutOrder = 1,
|
||||
onClick = self.props.onAbort,
|
||||
}) else nil,
|
||||
Abort = if hasChanges
|
||||
then e(TextButton, {
|
||||
text = "Abort",
|
||||
style = "Bordered",
|
||||
transparency = self.props.transparency,
|
||||
layoutOrder = 1,
|
||||
onClick = self.props.onAbort,
|
||||
})
|
||||
else nil,
|
||||
|
||||
Accept = e(TextButton, {
|
||||
text = if hasChanges then "Accept" else "OK",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue