You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
445 B
Rust
26 lines
445 B
Rust
use uwui_dsl::NativeComponent;
|
|
|
|
use crate::backend::Backend;
|
|
use crate::view::{NativeComponent, NewNative};
|
|
|
|
#[derive(NativeComponent)]
|
|
pub struct Button {
|
|
params: ButtonParams,
|
|
}
|
|
|
|
#[derive(Default)]
|
|
pub struct ButtonParams {
|
|
pub label: String,
|
|
}
|
|
|
|
impl<B: Backend> NewNative<B> for Button
|
|
where
|
|
Button: NativeComponent<B>,
|
|
{
|
|
type Params = ButtonParams;
|
|
|
|
fn new(params: Self::Params) -> Self {
|
|
Self { params }
|
|
}
|
|
}
|