summaryrefslogtreecommitdiffstats
path: root/widget
diff options
context:
space:
mode:
Diffstat (limited to 'widget')
-rw-r--r--widget/src/checkbox.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/widget/src/checkbox.rs b/widget/src/checkbox.rs
index eb1faf5c..c18ace73 100644
--- a/widget/src/checkbox.rs
+++ b/widget/src/checkbox.rs
@@ -28,7 +28,7 @@ pub use crate::style::checkbox::{Appearance, StyleSheet};
///
/// let is_checked = true;
///
-/// Checkbox::new("Toggle me!", is_checked, Message::CheckboxToggled);
+/// Checkbox::new("Toggle me!", is_checked).on_toggle(Message::CheckboxToggled);
/// ```
///
/// ![Checkbox drawn by `iced_wgpu`](https://github.com/iced-rs/iced/blob/7760618fb112074bc40b148944521f312152012a/docs/images/checkbox.png?raw=true)