Skip to content

Commit

Permalink
chore: Small doc refinement
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Dec 17, 2023
1 parent d34c243 commit e37f663
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/components/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ pub struct InputProps<'a> {
pub value: String,
/// Handler for the `onchange` event.
pub onchange: EventHandler<'a, String>,
/// Is input hidden with a character. By default input text is shown.
/// Display mode for Input. By default, input text is shown as it is provided.
#[props(default = InputMode::Shown, into)]
pub hidden: InputMode,
pub mode: InputMode,
}

/// `Input` component.
Expand Down Expand Up @@ -98,7 +98,7 @@ pub fn Input<'a>(cx: Scope<'a, InputProps<'a>>) -> Element {
});
}

let text = match cx.props.hidden {
let text = match cx.props.mode {
InputMode::Hidden(ch) => ch.to_string().repeat(cx.props.value.len()),
InputMode::Shown => cx.props.value.clone(),
};
Expand Down

0 comments on commit e37f663

Please sign in to comment.