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:
Joe 2026-02-01 10:10:38 -06:00
parent af65056c44
commit a8752b6b8d
2 changed files with 18 additions and 19 deletions

View file

@ -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",