1use crate::prelude::*;
2use crate::{h_stack, EditorPane, Icon, IconButton, Input};
3
4#[derive(Element)]
5#[element(view_state = "EditorPane")]
6pub struct BufferSearch {}
7
8impl BufferSearch {
9 pub fn new() -> Self {
10 Self {}
11 }
12
13 fn render(
14 &mut self,
15 _view: &mut EditorPane,
16 cx: &mut ViewContext<EditorPane>,
17 ) -> impl Element<ViewState = EditorPane> {
18 let theme = theme(cx);
19
20 h_stack()
21 .fill(theme.highest.base.default.background)
22 .p_2()
23 .child(
24 h_stack()
25 .child(Input::new("Search (↑/↓ for previous/next query)"))
26 .child(IconButton::new(Icon::Replace)),
27 )
28 }
29}