feat: close button in the history panel header
Co-Authored-By: Ovis Fast (Claude) <[email protected]>
This commit is contained in:
1 parent
02d579c8b8
commit
75025c2406
2 files changed
+22
No files matched your search
@@ -43,6 +43,7 @@ const TEXT_HEIGHT = 34;
|
||||
* pick: (key:string, cx:any) => void,
|
||||
* toggle: (key:string, cx:any) => void,
|
||||
* clear: (cx:any) => void,
|
||||
* close: (cx:any) => void,
|
||||
* }} on
|
||||
*/
|
||||
export function renderPanel(t, view, on) {
|
||||
@@ -114,6 +115,21 @@ function renderTop(t, view, on) {
|
||||
.child("✕"),
|
||||
),
|
||||
),
|
||||
// Close the panel - the same road as Esc.
|
||||
div()
|
||||
.id("composer-panel-close")
|
||||
.size(28)
|
||||
.flex_none()
|
||||
.flex()
|
||||
.items_center()
|
||||
.justify_center()
|
||||
.rounded(6)
|
||||
.text_size(13)
|
||||
.text_color(t.dim)
|
||||
.cursor_pointer()
|
||||
.hover((s) => s.bg(t.hover).text_color(t.foreground))
|
||||
.on_click((event, cx) => on.close(cx))
|
||||
.child("✕"),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user