gpui-component 0.8.0

GPUI Component: the styled component library of GPUI Kit, with 60+ desktop UI components for GPUI.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use gpui::App;
use rust_i18n::t;

use crate::{
    Icon, IconName, Sizable as _,
    button::{Button, ButtonVariants as _},
};

#[inline]
pub(crate) fn clear_button(_: &App) -> Button {
    Button::new("clean")
        .icon(Icon::new(IconName::Close))
        // Icon-only: screen readers have nothing else to announce.
        .accessibility_label(t!("Input.Clear"))
        .text()
        .xsmall()
        .tab_stop(false)
}