chore: refactor the input component (#165)

* refactor the input component

* fix clippy

* clean up
This commit is contained in:
reya
2025-09-25 08:03:14 +07:00
committed by GitHub
parent a87184214f
commit 61cad5dd96
20 changed files with 2529 additions and 1593 deletions

View File

@@ -1,16 +1,15 @@
use gpui::{App, Styled};
use i18n::t;
use theme::ActiveTheme;
use crate::button::{Button, ButtonVariants as _};
use crate::{Icon, IconName, Sizable as _};
use crate::button::{Button, ButtonVariants};
use crate::{Icon, IconName, Sizable};
#[inline]
pub(crate) fn clear_button(cx: &App) -> Button {
Button::new("clean")
.icon(Icon::new(IconName::CloseCircle))
.tooltip(t!("common.clear"))
.tooltip("Clear")
.small()
.text_color(cx.theme().text_muted)
.transparent()
.text_color(cx.theme().text_muted)
}