Skip to content

Commit d32fddc

Browse files
committed
Revert "Focus confirm button instead of cancel in modals (#2340)"
6615cb6
1 parent 84a1501 commit d32fddc

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

app/ui/lib/Modal.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,10 @@ Modal.Footer = ({
132132
}) => (
133133
<footer className="flex items-center justify-between border-t px-3 py-3 border-secondary">
134134
<div className="mr-4">{children}</div>
135-
<div className="flex flex-row-reverse gap-2">
136-
{/* Note the confirm button is first so it autofocuses when the modal opens,
137-
but it displays in the right order because of flex-row-reverse */}
135+
<div className="space-x-2">
136+
<Button variant="secondary" size="sm" onClick={onDismiss}>
137+
{cancelText || 'Cancel'}
138+
</Button>
138139
<Button
139140
size="sm"
140141
variant={actionType}
@@ -144,9 +145,6 @@ Modal.Footer = ({
144145
>
145146
{actionText}
146147
</Button>
147-
<Button variant="secondary" size="sm" onClick={onDismiss}>
148-
{cancelText || 'Cancel'}
149-
</Button>
150148
</div>
151149
</footer>
152150
)

0 commit comments

Comments
 (0)