Skip to content

Commit 640daa8

Browse files
committed
Add Escape key handlers to close modals and adjust hover colors in footer buttons
1 parent e8c0018 commit 640daa8

5 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎packages/ui/src/components/editor/panel/modals/AutoClosingModal/AutoClosingModal.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export const AutoClosingModal: React.FC<Props> = (props) => {
2929
onKeyDown={(e) => {
3030
if (e.key == 'Escape') {
3131
e.stopPropagation()
32+
props.on_close()
3233
}
3334
}}
3435
>

‎packages/ui/src/components/editor/panel/modals/EditCheckpointDescriptionModal/EditCheckpointDescriptionModal.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const EditCheckpointDescriptionModal: React.FC<Props> = (props) => {
1717
onKeyDown={(e) => {
1818
if (e.key == 'Escape') {
1919
e.stopPropagation()
20+
props.on_cancel()
2021
}
2122
}}
2223
>

‎packages/ui/src/components/editor/panel/modals/ProgressModal/ProgressModal.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export const ProgressModal: React.FC<Props> = (props) => {
8787
onKeyDown={(e) => {
8888
if (e.key == 'Escape') {
8989
e.stopPropagation()
90+
props.on_cancel?.()
9091
}
9192
}}
9293
>

‎packages/ui/src/components/editor/panel/modals/QRCodeModal/QRCodeModal.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const QRCodeModal: React.FC<Props> = (props) => {
1515
onKeyDown={(e) => {
1616
if (e.key == 'Escape') {
1717
e.stopPropagation()
18+
props.on_close()
1819
}
1920
}}
2021
>

‎packages/vscode/src/views/panel/frontend/components/Layout/Footer/Footer.module.scss‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
}
5757

5858
&:hover {
59-
background-color: color-mix(in srgb, #f7d600, black 10%);
59+
background-color: color-mix(in srgb, #f7d600, transparent 20%);
6060
}
6161
}
6262

@@ -68,7 +68,7 @@
6868
}
6969

7070
&:hover {
71-
background-color: color-mix(in srgb, #ff4500, black 10%);
71+
background-color: color-mix(in srgb, #ff4500, transparent 10%);
7272
}
7373
}
7474

@@ -80,7 +80,7 @@
8080
}
8181

8282
&:hover {
83-
background-color: color-mix(in srgb, #5765f2, black 10%);
83+
background-color: color-mix(in srgb, #5765f2, transparent 10%);
8484
}
8585
}
8686
}

0 commit comments

Comments
 (0)