File tree Expand file tree Collapse file tree
vscode/src/views/panel/frontend Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 gap : 3px ;
66 min-height : 28px ;
77 font-size : 13px ;
8- padding : 4px 16px ;
98 font-family : system-ui , sans-serif ;
109 border : none ;
1110 text-decoration : none ;
3534 }
3635
3736 & --secondary {
38- color : var (--vscode-button-secondaryForeground );
3937 background-color : var (--vscode-button-secondaryBackground );
4038
4139 & :hover {
4947 }
5048 }
5149
50+ & --danger {
51+ background-color : var (--vscode-inputValidation-errorBorder );
52+
53+ & :hover {
54+ background-color : color-mix (
55+ in srgb ,
56+ var (--vscode-inputValidation-errorBorder ) 80% ,
57+ var (--cwc-text-color )
58+ );
59+ }
60+
61+ & :disabled {
62+ & :hover {
63+ background-color : var (--vscode-inputValidation-errorBorder );
64+ }
65+ }
66+ }
67+
5268 & --small {
5369 min-height : unset ;
5470 font-size : 11px ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ type Props = {
1010 codicon ?: string
1111 title ?: string
1212 is_secondary ?: boolean
13+ is_danger ?: boolean
1314 is_focused ?: boolean
1415 is_small ?: boolean
1516}
@@ -25,7 +26,8 @@ export const Button: FC<Props> = (props) => {
2526
2627 const className = cn ( styles . button , {
2728 [ styles [ 'button--secondary' ] ] : props . is_secondary ,
28- [ styles [ 'button--small' ] ] : props . is_small
29+ [ styles [ 'button--small' ] ] : props . is_small ,
30+ [ styles [ 'button--danger' ] ] : props . is_danger
2931 } )
3032
3133 const children = (
Original file line number Diff line number Diff line change @@ -2,19 +2,24 @@ import { Button } from '../../common/Button'
22import styles from './ResponsePreviewFooter.module.scss'
33
44type Props = {
5+ on_back : ( ) => void
56 on_reject : ( ) => void
67 on_accept : ( ) => void
78 is_accept_disabled : boolean
89}
910
1011export const ResponsePreviewFooter : React . FC < Props > = ( {
12+ on_back,
1113 on_reject,
1214 on_accept,
1315 is_accept_disabled
1416} ) => {
1517 return (
1618 < div className = { styles . container } >
17- < Button on_click = { on_reject } is_secondary >
19+ < Button on_click = { on_back } is_secondary >
20+ Back
21+ </ Button >
22+ < Button on_click = { on_reject } is_danger >
1823 Reject
1924 </ Button >
2025 < Button on_click = { on_accept } disabled = { is_accept_disabled } >
Original file line number Diff line number Diff line change @@ -419,6 +419,12 @@ export const Panel = () => {
419419 } }
420420 footer_slot = {
421421 < UiResponsePreviewFooter
422+ on_back = { ( ) => {
423+ post_message ( vscode , {
424+ command : 'RESPONSE_PREVIEW' ,
425+ files : [ ]
426+ } )
427+ } }
422428 on_reject = { ( ) => {
423429 if ( preview_item_created_at ) {
424430 set_response_history ( ( prev ) =>
You can’t perform that action at this time.
0 commit comments