diff options
Diffstat (limited to 'pure/src/widget/text_input.rs')
-rw-r--r-- | pure/src/widget/text_input.rs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/pure/src/widget/text_input.rs b/pure/src/widget/text_input.rs index d6041d7f..11e93b44 100644 --- a/pure/src/widget/text_input.rs +++ b/pure/src/widget/text_input.rs @@ -16,19 +16,17 @@ pub use iced_style::text_input::{Style, StyleSheet}; /// # Example /// ``` /// # use iced_native::renderer::Null; -/// # use iced_native::widget::text_input; +/// # use iced_pure::widget::text_input; /// # -/// # pub type TextInput<'a, Message> = iced_native::widget::TextInput<'a, Message, Null>; +/// # pub type TextInput<'a, Message> = iced_pure::widget::TextInput<'a, Message, Null>; /// #[derive(Debug, Clone)] /// enum Message { /// TextInputChanged(String), /// } /// -/// let mut state = text_input::State::new(); /// let value = "Some text"; /// /// let input = TextInput::new( -/// &mut state, /// "This is the placeholder...", /// value, /// Message::TextInputChanged, @@ -58,10 +56,9 @@ where /// Creates a new [`TextInput`]. /// /// It expects: - /// - some [`State`] - /// - a placeholder - /// - the current value - /// - a function that produces a message when the [`TextInput`] changes + /// - a placeholder, + /// - the current value, and + /// - a function that produces a message when the [`TextInput`] changes. pub fn new<F>(placeholder: &str, value: &str, on_change: F) -> Self where F: 'a + Fn(String) -> Message, @@ -86,10 +83,9 @@ where self } - /// Sets the [`Font`] of the [`Text`]. + /// Sets the [`Font`] of the [`TextInput`]. /// - /// [`Font`]: crate::widget::text::Renderer::Font - /// [`Text`]: crate::widget::Text + /// [`Font`]: iced_native::text::Renderer::Font pub fn font(mut self, font: Renderer::Font) -> Self { self.font = font; self |