summaryrefslogtreecommitdiffstats
path: root/src/widget
diff options
context:
space:
mode:
Diffstat (limited to 'src/widget')
-rw-r--r--src/widget/button.rs6
-rw-r--r--src/widget/text.rs6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/widget/button.rs b/src/widget/button.rs
index abcdbfeb..6f5d9908 100644
--- a/src/widget/button.rs
+++ b/src/widget/button.rs
@@ -40,9 +40,11 @@ use std::hash::Hash;
/// ![Button drawn by Coffee's renderer](https://github.com/hecrj/coffee/blob/bda9818f823dfcb8a7ad0ff4940b4d4b387b5208/images/ui/button.png?raw=true)
pub struct Button<'a, Message> {
state: &'a mut State,
- label: String,
+ /// The label of the button.
+ pub label: String,
class: Class,
- on_press: Option<Message>,
+ /// The message to produce when the button is pressed
+ pub on_press: Option<Message>,
style: Style,
}
diff --git a/src/widget/text.rs b/src/widget/text.rs
index 59b599bb..b529cfd2 100644
--- a/src/widget/text.rs
+++ b/src/widget/text.rs
@@ -29,8 +29,10 @@ use std::hash::Hash;
/// ```
#[derive(Debug, Clone)]
pub struct Text<Color> {
- content: String,
- size: Option<u16>,
+ /// The text contents
+ pub content: String,
+ /// The text size
+ pub size: Option<u16>,
color: Option<Color>,
style: Style,
horizontal_alignment: HorizontalAlignment,