wgpui-component 0.8.1

UI components for building desktop applications with wgpui (Longbridge gpui-component v0.8.1 adaptor).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use rust_i18n::t;
use wgpui::App;

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)
}