1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//! Basic UI components library for Tessera.
//! Internal animation utilities are available via the private `animation` module.
//! Basic components for the Tessera UI framework.
//!
//! # Usage
//!
//! First, you need to register the pipelines provided by this crate.
//!
//! ```no_run
//! use tessera_ui::renderer::Renderer;
//! use tessera_ui_basic_components::pipelines::register_pipelines;
//!
//! Renderer::run(
//! // ...
//! # || {}, // Placeholder for root component
//! |app| {
//! tessera_ui_basic_components::pipelines::register_pipelines(app);
//! }
//! );
//! ```
//!
//! Then you can use the components in your UI.
//!
//! # Example
//!
//! ```
//! use std::sync::Arc;
//! use parking_lot::RwLock;
//!
//! use tessera_ui::Dp;
//! use tessera_ui_basic_components::{
//! button::{button, ButtonArgs},
//! text::text,
//! text_editor::{text_editor, TextEditorArgs, TextEditorState},
//! RippleState,
//! };
//!
//! // Button example
//! let ripple_state = RippleState::new();
//! button(
//! ButtonArgs {
//! on_click: Some(Arc::new(|| { /* Handle click */ })),
//! ..Default::default()
//! },
//! ripple_state.clone(),
//! || text("Click me".to_string()),
//! );
//!
//! // Text editor example
//! let editor_state = TextEditorState::new(Dp(16.0), None);
//! text_editor(TextEditorArgs::default(), editor_state.clone());
//! ```
pub use RippleState;