move gpui-components to ui crate
This commit is contained in:
18
crates/ui/src/input/clear_button.rs
Normal file
18
crates/ui/src/input/clear_button.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
use gpui::{Styled, WindowContext};
|
||||
|
||||
use crate::{
|
||||
button::{Button, ButtonVariants as _},
|
||||
theme::ActiveTheme as _,
|
||||
Icon, IconName, Sizable as _,
|
||||
};
|
||||
|
||||
pub(crate) struct ClearButton {}
|
||||
|
||||
impl ClearButton {
|
||||
pub fn new(cx: &mut WindowContext) -> Button {
|
||||
Button::new("clean")
|
||||
.icon(Icon::new(IconName::CircleX).text_color(cx.theme().muted_foreground))
|
||||
.ghost()
|
||||
.xsmall()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user